How to get the contents of the site via php?
<?php Header("Content-Type: text/html;charset=UTF-8"); include 'simple_html_dom.php'; $ch = curl_init(); $curl_log = fopen("curl_log.txt", 'w+'); curl_setopt($ch, CURLOPT_STDERR, $curl_log); curl_setopt($ch, CURLOPT_VERBOSE, TRUE); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'); curl_setopt($ch, CURLOPT_URL, "http://anistar.ru/new/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result=iconv('CP1251', 'UTF-8', curl_exec($ch)); exit('Ошибка curl: ' . curl_error($ch)); curl_close($ch); echo $result; echo $curl_log; ?> This code does not work. blank screen is white. file_get is the same. How to be? is there any possibility?
New Logs
* About to connect() to anistar.ru port 80 (#0) * Trying 185.11.145.7... * connected > GET /new/ HTTP/1.1 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36 Host: anistar.ru Accept: */* < HTTP/1.1 200 OK < Server: nginx < Date: Sun, 06 Sep 2015 10:41:58 GMT < Content-Type: text/html < Transfer-Encoding: chunked < Connection: keep-alive < Keep-Alive: timeout=20 < Vary: Accept-Encoding < X-XSS-Protection: 1; mode=block < * Connection #0 to host anistar.ru left intact * Closing connection #0 
exit('Ошибка curl: ' . curl_error($ch));beforecurl_close($ch);put it. - VismanОшибка curl:issued, the error is not in curl. Remove the command from the code. - Visman