主页  范文大全   设计学院   SEO研究   免费资源信息   网赚大全   QQ资源区   在线电影   站长博客   校内网   理财知识   求片报错   访客留言   非主流字体转换

www.alexa.com 世界排名查询


作者:学习与生…    文章来源:本站原创    点击数:    更新时间:2008-2-24
         声明:本站所有资料素材均是由站长精心整理搜集的,属于原创。我们同意您的转载和复制,但是在转载复制时请保留文字出处。本站资料全部免费使用,无需注册,力求打造华北最强最大的免费资源网站。

输入域名:

该网站暂无排名!


世界排名查询的源代码:
<?php
//---------------------------
//世界排名的函数
//出品人:佛山无影脚
//QQ:8478354 cis@yeah.net
//www.9om.com (第九门)
//--------------------------

$wwwsitename = "<a href=http://www.kreny.com/>Kreny's Linux Study Note</a>"; //您的域名

$thisyear = date("Y");

if (isset($_REQUEST['domain'])) $domain = $_REQUEST['domain'];
else {
$domain = "";
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
<head>
<title>www.alexa.com 世界排名查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<center><br><br>
<form action="">
<h2>www.alexa.com 世界排名查询</h2>
<table><tr><td>输入域名:<input type=text name=domain size=30 value="<?php echo $domain;?>"> <input type=submit value=查看排名></td><td>
</td></tr></table>
</form>

<?php

if ($domain != "") {

$domain_rank = number_format(@domain2rank($domain));
if ($domain_rank != "0")
echo"<h3> $domain 排名:全球第 <font color=red>$domain_rank</font> 位!</h3>";
else
echo"<h3>该网站暂无排名!</h3>";
}

function domain2rank($domain)
{
$url = "http://www.alexa.com/data/details/traffic_details?&range=1y&size=large&compare_sites=&url=$domain";
$results = @implode(' ', file($url));
$results = @explode("Traffic Rank for", $results);
$results = @preg_replace("_</td>.*|<([^>]|\n)*>|\.{2,}|(&[[:alnum:]#]+;)|[[:space:]]{1,}|,_is", "", $results[1]);
$results = @explode(":", $results);
$rank = $results[1];
return $rank;
}
echo"<!--Powered By $wwwsitename-->";
?>
<p>&copy <?php echo $thisyear."&nbsp;".$wwwsitename;?>
</center>
</body>
</html>


Alexa Traffic History Graph
Alexa Traffic Graph for www.kreny.com, www.hzmjp.com
文章录入:xxYsh.com    责任编辑:admin 
发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
  • 下一篇文章: 没有了