I want to execute this code on local server. It gives the response, but when I try to run the same code on live stage server, it returns a 404 error.
$url = "http://www.google.com/search?q=saree&num=100&start=0&pws=0";
$name = $name;
$encoded = $url.$name;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, '111.119.226.129');
curl_setopt($ch, CURLOPT_PROXYPORT,'80');
curl_setopt($ch, CURLOPT_HEADER, 1);
$exec = curl_exec($ch);
curl_close ($ch);
I use random valid proxies for this code, and I'm sure the proxy is valid.
Can anyone help me please?