当前位置: 首页 > 图文教程 > 网络编程 > PHP > PR值查询 | PageRank 查询

PHP
PhpMyAdmin中无法导入sql文件的解决办法
PHP5.3.1 不再支持ISAPI
基于Windows下Apache PHP5.3.1安装教程
PHP 编程安全性小结
php正则判断中文字符
获取远程文件大小的php函数
PHP has encountered an Access Violation 错误的解决方法
PHP教程:COOKIE与SESSION联合实现跨域
PHP代码实例:图片转成HTML
PHP教程:PHP不能读取MS SQL数据表
Web开发帮助:学习http headers的方方面
cURL库的强大功能和灵活的扩展性
PHP教程:PHP的目录操作和文件操作
Fedora 12服务器上安装Apache2+PHP+MySQL
PHP开发网站常用的21种功能的代码汇总
php的curl获取有301/302跳转文件出错问题解决
难道研究PHP的人都是傻瓜吗?
WEB开发非常有用的9个PHP类库
PHP代码实例:常用的PHP分页类
PHP教程:foreach使用引用注意的问题

PHP 中的 PR值查询 | PageRank 查询


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 88 ::
收藏到网摘: n/a

复制代码 代码如下:

<?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>