|
Hi
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="http://www.google.co.in";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $filelocation);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL,1);
curl_setopt($ch, CURLOPT_PRXY, 'proxyname');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Pragma: "));
curl_setopt($ch, CURLOPT_PROXYPORT,'8080');
curl_setopt($ch, CURLOPT_PROXYPWD, 'Username:Password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,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
|