function Alexa ($domain)
{
$alexa = ';
$content = get_content (' http://www.alexa.com/data/details/traffic_details?url= '. $domain);
if (Preg_match ()/3 mos. Change ([ss]*?) </table>/", $content, $matches))
{
$change = Strpos ($matches [1], ' down_arrow.gif ')? ' Descend ': ' Rise ';
$p = Strip_tags ($matches [1], ' <td> ');
$p = Trim (str_replace array (" ", "N", "</td>"), Array (', ', '), $p));
$p = Explode ("<td>", $p);
if (Isset ($p [1])) $alexa. = ' Today: '. $p [1];
if (Isset ($p [2])) $alexa. = ' This week: '. $p [2];
if (Isset ($p [3])) $alexa. = ' This month: '. $p [3];
if (Isset ($p [4])) $alexa. = '. $change. ': '. $p [4];
}
if (Preg_match ("/review for $domain:</span> (. *) <br>/", $content, $matches))
{
$alexa = $alexa. ' Rank: '. $matches [1];
}
$alexa = ' <a href= ' http://www.alexa.com/data/details/traffic_details?url= '. $domain. ' target= ' _blank ' > '. $ Alexa. ' </a> ';
return $alexa;
}