curl requests are not reaching proxy
I have a curl code which tries to open some URL.
If I access that url from browser it works fine but curl request is not returning anything.
I checked with the network guys , they say the request does not even come to proxy to block or allow the request.
I am supplying proxy paramenters to the curl request..though its not working…
Below is the code I am using (with test URL as google)
$filelocation="
$ch = curl_init();
curlsetopt($ch, CURLOPTURL, $filelocation);
curlsetopt($ch, CURLOPTHTTPPROXYTUNNEL,1);
curlsetopt($ch, CURLOPTPRXY, 'proxyname');
curlsetopt($ch, CURLOPTHTTPHEADER, array("Pragma: "));
curlsetopt($ch, CURLOPTPROXYPORT,'8080');
curlsetopt($ch, CURLOPTPROXYPWD, 'Username:Password');
curlsetopt($ch, CURLOPTRETURNTRANSFER,1);
$html=curl_exec($ch);
curl_close ($ch);
print $html;
exit;
Do anyone has a pointer ,with which I can debug this issue ? any other way to do it ? or something I need to modify in above code ?
Thanks,
Sourabh
1 Reply
James