Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $domain = 'Checkthisup.com';
- echo 'Domain: '.$domain.'<br>';
- $data = file_get_contents('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$domain);
- if (preg_match('/\<popularity url\="(.*?)" text\="([0-9]+)" source="(.*?)"\/\>/si', $data, $matches))
- {
- $rank = $matches[2];
- }
- if (preg_match('/\<linksin num\="([0-9]+)"\/\>/si', $data, $matches))
- {
- $nooflinks = $matches[1];
- }
- echo 'Alexa Rank: '.number_format($rank).'<br>';
- echo 'Number of links: '.number_format($nooflinks). '<br>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment