получить alexa rank, но file_get_content не работает на живом сервере в php - PullRequest
0 голосов
/ 29 октября 2018

Мой код

$source = file_get_contents('http://data.alexa.com/data?cli=10&dat=snbamz&url=google.com');
print_r($source);
//Alexa Rank
preg_match('/\<popularity url\="(.*?)" text\="([0-9]+)" source\="panel"\/\>/si', $source, $matches);
$aresult = ($matches[2]) ? $matches[2] : 0;

, но print_r($source) не будет отображать данные.

...