Alexa is providing an API (not free) to access it database. But there is a way to do this for free. To get this data in XML format use following URL.

http://data.alexa.com/data?cli=10&dat=snbamz&url=[yourdomain.com]

simply change $url=’izulthea.com’; by your url address, and paste this code wherever you want to appear. By this Get Alexa Rank by PHP Script, it will provided a realtime ALEXA Rank without paid 🙂

<?php
$url='izulthea.com';
$xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$url);
$rank=isset($xml->SD[1]->POPULARITY)?$xml->SD[1]->POPULARITY->attributes()->TEXT:0;
$web=(string)$xml->SD[0]->attributes()->HOST;
echo $web." has Alexa Rank ".$rank;
 
?>

Need Book?
SEO for WordPress: How To Get Your Website on Page #1 of Google…Fast! [2nd Edition] (Volume 2)