rhoula

Untitled

Dec 24th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. $domain = 'Checkthisup.com';
  4. echo 'Domain: '.$domain.'<br>';
  5.  
  6.  
  7. $data = file_get_contents('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$domain);
  8. if (preg_match('/\<popularity url\="(.*?)" text\="([0-9]+)" source="(.*?)"\/\>/si', $data, $matches))
  9. {
  10. $rank = $matches[2];
  11. }
  12. if (preg_match('/\<linksin num\="([0-9]+)"\/\>/si', $data, $matches))
  13. {
  14. $nooflinks = $matches[1];
  15. }
  16. echo 'Alexa Rank: '.number_format($rank).'<br>';
  17. echo 'Number of links: '.number_format($nooflinks). '<br>';
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment