获取alax排名的php程序


第二个参数是表示排名是上升还是下降中~~

  1. <?php
  2. $GLOBALS[‘HOST’]=parse_url($GLOBALS[‘URL’]);
  3. $body=file_get_contents(‘http://www.alexa.com/siteinfo/’.$GLOBALS[‘HOST’][‘host’]);
  4. preg_match("@<div class=\"data (.*)\">(.*)</a></div>(\r|\n|\s|\t)+<div class=\"label\">Traffic Rank@",$body,$dd);
  5. echo "alax traffic rank {$dd[2]} [{$dd[1]}]";
  6. ?>
  1. No comments yet.
(will not be published)

  1. No trackbacks yet.