Alexa API for Website Traffic Rank


[ad_2]

How to get Alexa Ranking of websites via its API Complete tutorial to getch Ranking via Alexa API using PHP.

source
[ad_1]

3 replies
  1. Sociat
    Sociat says:

    <?php // SOCIAT jobs website
    $url="http://sociat.com";
    $response = file_get_contents('http://data.alexa.com/data?cli=10&url=&#39;.$url);
    $xml = simplexml_load_string($response);

    $global_rank = $xml->SD->POPULARITY['TEXT'];
    $country_name = $xml->SD->COUNTRY['NAME'];
    $country_rank = $xml->SD->COUNTRY['RANK'];
    $delta_rank = $xml->SD->RANK['DELTA'];

    echo "Country Name: ".$country_name;
    echo '<br>';
    echo "Country Rank : ".$country_rank;
    echo '<br>';
    echo "Global Rank : ".$global_rank;
    echo '<br>';
    echo "Position : ".$delta_rank;
    ?>

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.