PR值查询 | PageRank 查询

所属分类: 网络编程 / PHP编程 阅读数: 1986
收藏 0 赞 0 分享
复制代码 代码如下:

<?php
/*
    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);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>电脑酒吧 :: PR值查询 | PageRank 查询</title>
</head>
<body onload="javascript:document.frmPr.url.focus();">
<form name="frmPr" method="post" action="pr.php">
输入要查询的网址:
<input type="text" name="url" size="30">
<input type="submit">
</form>
<?php
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 "<a href=\"".$hrefurl."\" target=\"_blank\">".$url."</a> 的PR值是 <b>".$pagerank[1]."</b> , ";
    $whoisurl=str_replace("http://","",$hrefurl);
    $whoisurl=str_replace("www.","",$whoisurl);
    $whoisurl=str_replace("/","",$whoisurl);
    echo "<a href=\"http://whois.domaintools.com/".$whoisurl."\" target=\"_blank\">WHOIS</a> , ";
    //echo "<a href=\"http://www.computer98.com/whois/?whois=".$whoisurl."\" target=\"_blank\">WHOIS</a> , ";
    echo "<a href=\"http://alexa.chinaz.com/?domain=".$url."\" target=\"_blank\">ALEXA</a><br>";

    $google_link="<iframe src=\"http://www.google.com/search?q=link:".$url."\" width=\"50%\" height=\"500\">";
    $google_site="<iframe src=\"http://www.google.com/search?q=site:".$url."\" width=\"50%\" height=\"500\">";
    //$baidu_link="<iframe src=\"http://www.baidu.com/s?wd=link:".$url."\">";
    //$baidu_site="<iframe src=\"http://www.baidu.com/s?wd=site:".$url."\">";

    $baidu_link="<a href=\"http://www.baidu.com/s?wd=link:".$url."\" target=\"_blank\">baidu link</a>";
    $baidu_site="<a href=\"http://www.baidu.com/s?wd=site:".$url."\" target=\"_blank\">baidu site</a>";
}
?>
<FORM METHOD=POST ACTION="http://www.ip138.com/ips8.asp" name="ipform" target="_blank">
<tr><td align="center">IP地址:<input type="text" name="ip" size="16" value="<?php echo gethostbyname($whoisurl); ?>"> 
<input type="submit" value="查询"><INPUT TYPE="hidden" name="action" value="2">
</td></tr></FORM>
<?php
    echo $baidu_link."  ";
    echo $baidu_site."<br>";
    echo $google_link;
    echo $google_site;
?>
<a href="http://www.computer98.com/pr.php?show_source=true">show source</a><br>
</body>
</html> 
更多精彩内容其他人还在看

两种php去除二维数组的重复项方法

这篇文章主要介绍了两种php去除二维数组的重复项方法,大家可以进行比较看哪一种更适合自己,需要的朋友可以参考下
收藏 0 赞 0 分享

php实现分页功能的3种方法第1/3页

这篇文章主要介绍了php实现分页功能的3种方法,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

php对二维数组进行相关操作(排序、转换、去空白等)

这篇文章主要介绍了php对二维数组进行相关操作,包括php对二维数组排序、转换、去空白,以及去重复值等,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

php实现网站留言板功能

这篇文章主要介绍了php实现网站留言板功能,主要仿照了畅言留言板和网易跟帖样式进行制作,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

PHP实现HTML页面静态化的方法

这篇文章主要介绍了PHP实现HTML页面静态化的方法,分享了静态处理的方法,静态处理后的优势,并提供了多种静态的方法,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

php对文件夹进行相关操作(遍历、计算大小)

这篇文章主要介绍了php对文件夹进行相关操作,包括遍历并打印指定目录下所有文件和计算文件大小去空白,以及去重复值等,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

非常全面的php日期时间运算汇总

这篇文章主要整理了关于php日期时间运算相关内容,涉及知识点较为全面,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

php根据用户语言跳转相应网页

这篇文章主要介绍了php根据用户语言跳转相应网页的方法,主要区分国内国外,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

双冒号 ::在PHP中的使用情况

前几天在百度知道里面看到有人问PHP中双冒号::的用法,当时给他的回答比较简洁因为手机打字不大方便!今天突然想起来,所以在这里总结一下我遇到的双冒号::在PHP中使用的情况
收藏 0 赞 0 分享

PHP explode()函数的几个应用和implode()函数有什么区别

这篇文章主要介绍了PHP explode()函数的几个应用和implode()函数有什么区别,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多