I'm trying to using cURL to send a Post variable and through a proxy server. I know how to send requests through a proxy server or how to do post variables. I tried to combine them, but it doesn't work. The code I'm posting work as it should if I comment out either the proxy or the two post lines, but not as is.
[PHP]
$ch = curl_init("http://mysite.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, "myproxyip");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "field=value");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$data = curl_exec ($ch);
curl_close($ch);
print $data;
[/PHP]