Hi,
I am looking for a solution in the following problem.
The curl plugin is posting the variable seperated, I would like to post the variable as an array, simulating the below:
Is it possible?
Thanks a lot for the support.
George
I am looking for a solution in the following problem.
The curl plugin is posting the variable seperated, I would like to post the variable as an array, simulating the below:
<?php
$url = "http://www.yourdomain.com/whmcs/includes/api.php"; # URL to WHMCS API file
$username = "Admin"; # Admin username goes here
$password = "demo"; # Admin password goes here
$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "addinvoicepayment"; #action performed by the API:Functions
$postfields["invoiceid"] = "1";
$postfields["transid"] = "TEST";
$postfields["gateway"] = "mailin";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
?>
Is it possible?
Thanks a lot for the support.
George
Hi
I tested but the case is the IP that is posting the cURL data is the IP of the PC using the form.
My problem is that the IP needs to be IP of the server.
Is this possible to be performed?
Thanks
I tested but the case is the IP that is posting the cURL data is the IP of the PC using the form.
My problem is that the IP needs to be IP of the server.
Is this possible to be performed?
Thanks
This topic is locked and no more replies can be posted.