Hello.
Such a problem: on LAN everything is fine, as soon as I transfer the hosting server to the hosting server, the router stops responding. That is, for example, if checked via cURL:
function isUp($url) { if(!filter_var($url, FILTER_VALIDATE_URL)) { return false; } $curlInit = curl_init($url); curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,10); curl_setopt($curlInit,CURLOPT_HEADER,true); curl_setopt($curlInit,CURLOPT_NOBODY,true); curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true); $response = curl_exec($curlInit); curl_close($curlInit); if($response) { return true; } return false; }
This returns FALSE. Further, if you remove the check, it simply does not display anything.
$page_content = file_get_contents('http://rutor.org/'); $html = phpQuery::newDocument($page_content); foreach($html->find('#index .tum, .gai') as $key => $value) { $result[$key]['date'] = pq($value)->find('td:eq(0)')->text(); }
Tried through cURL, replace the referrer, put USER_AGENT, nothing helps.
What could be the problem? I repeat, everything works great on LAN. Thank you in advance.