I rake content from a page, but its page is given only to browsers, scripts without corresponding headers display something like:

"If you can read this, you’re not sure:

How to get around?

  • Write the page address and script code. But it turns out there is a topic, but no one can advise or scold. - sergey

1 answer 1

In the curl session add:

curl_setopt($ch, CURLOPT_USERAGENT, "Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.9.168 Version/11.51"); 
  • Warning: curl_setopt (): Suppose we have a valid resource in Z: \ ....... \ index.php on line 3 How to get rid of? - andrewshka
  • I'm stupid. $ ch = curl_init (); Added by. But nothing has changed. - andrewshka
  • Lay out all the code for clarity. - Alexis