<?php
$url = $_GET['url'];
$url = str_replace('http://', '', $url);
$url = str_replace('www.', '', $url);

if (empty($url)) $url = '35dir.com';

$query_url = 'http://data.alexa.com/data/+wQ411en8000lA?cli=10&dat=snba&ver=7.0&cdt=alx_vw=20&wid=12206&act=00000000000&ss=1680x1050&bw=964&t=0&ttl=35371&vis=1&rq=4&url='.$url;
$content = @file_get_contents($query_url);

preg_match('/<POPULARITY URL=\"(.*?)\" TEXT=\"(.*?)\"\/>/i', $content, $alexa);

$alexarank = strip_tags($alexa[2]);

echo $alexarank;
?>