NameSilo

Alexa Rank Script?

NamecheapNamecheap
Watch
Impact
33
How can I access alexa rank?
I would like to display it for a a couple domains.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
0
•••
sorry, looking for PHP
but thanks
 
0
•••
Try:
Code:
<?php
    function GetAlexaRanking($url) {
    $subscription_id = "SUBSCRIPTION_ID";
    list($protocol, $uri) = split('//', $url);
    $url = "http://aws-beta.amazon.com/onca/xml?Service=AlexaWebInfoService&SubscriptionId=$subscription_id&Operation=UrlInfo&Response=Rank&Url=$uri";
    $xml = file_get_contents($url);
    if(eregi("<rank *>([^<]*)</rank *>",$xml,$r)) {
    $rank = $r[1];
    } else {
    $rank = 0;
    }
    $rank = number_format($rank);
    return $rank;
    }


// Now a sample usage code
$url = "http://www.mydomain.com";
echo GetAlexaRanking($url);
?>

The $url is the url to check.
Have fun!
 
0
•••
I need a subscription ID from alexa for that? correct?
i was hoping one that didn't need an API
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Spaceship
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back