I need a simple Scraper for Yandex.
I already have a script, but one day it stopped working and at the moment I'm not sure where the issue is. Played around with proxies and followlocation.
This script just outputs "**", but not the Yandex site. If I open the URL directly in the browser, it works.
Example-URL: [login to view URL]
I need a working script that just loads Yandex and even bypass the lacy load
I do not need a proxy service, database storage or dom parsing.
My existing script:
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_REFERER, "[login to view URL]");
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0');
$url = '[login to view URL]'.$page.'&rpt=imagecbir&uinfo=ww-2560-wh-1155-fw-0-fh-598-pd-1&img_url='.$image;
curl_setopt($ch, CURLOPT_URL, $url);
$content = curl_exec($ch);
echo $url;
echo "**".$content;