I try to make a parser, but do not want to work, writes
Object Moved This object may be found here.
Google, but solutions could not be found. What is the protection method that prohibits parsing data from this site?
$url = 'http://elibrary.ru/titles.asp'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.6 (KHTML, like Gecko) Chrome/16.0.897.0 Safari/535.6'); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($ch, CURLOPT_REFERER, $url); $content = curl_exec($ch); curl_close($ch); echo $content;
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
not? - Dmitriy Simushev