当前位置:Gxlcms > PHP教程 > PR值查询|PageRank查询_php实例

PR值查询|PageRank查询_php实例

时间:2021-07-01 10:21:17 帮助过:20人阅读

代码如下:
/*
filename : http://www.computer98.com/pr.php
version : 0.02
author : computer98.com
from : www.computer98.com
last modified: 2006-12-17 1:45
remark : 转载请保留此信息,及出处。
*/

if(!empty($_REQUEST['show_source'])){
show_source("pr.php");
die(0);
}
?>



电脑酒吧 :: PR值查询 | PageRank 查询



if(!empty($_REQUEST['url'])){
$url=$_REQUEST['url'];
$f2= file_get_contents("http://www.getyourpagerank.com/rank.php?url=".$url);
preg_match("/PageRank:\s*(\d*)/i",$f2,$pagerank);
$hrefurl="http://".str_replace("http://","",$url);
echo "".$url." 的PR值是 ".$pagerank[1]." , ";
$whoisurl=str_replace("http://","",$hrefurl);
$whoisurl=str_replace("www.","",$whoisurl);
$whoisurl=str_replace("/","",$whoisurl);
echo "WHOIS , ";
//echo "WHOIS , ";
echo "ALEXA
";

$google_link="