I am having trouble posting form data to a remote script using cURL where the script is located via an IP address. This is what I'm trying to do which is currently not working:
Code: Select all
$url = "http://xxx.xxx.xx.xxx:xxx/scripts/myscript.py";
$args = "username=".urlencode($user['username']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$args);
$result= curl_exec ($ch);
curl_close ($ch);Thanks.