最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 友情链接批量查询工具下载
时间:2009-03-06 编辑:简简单单 来源:一聚教程网
$max_allow_links = 100; // 最大许可检查的链接数目
// 此函数转载于www.lian123.com,特别鸣谢
function my_file_get_contents($url, $timeout=30) {
if ( function_exists('curl_init') ) {
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
} else if ( ini_get('allow_url_fopen') == 1 || strtolower(ini_get('allow_url_fopen')) == 'on' ) {
$file_contents = @file_get_contents($url);
} else {
$file_contents = '';
}
return $file_contents;
}
// 开始检查
if( isset($_GET['mod']) && $_GET['mod'] == 'check_now' && isset($_GET['id']) && isset($_GET['my_url']) && isset($_GET['url']) && isset($_GET['auto_check']) ){
$js_id = 'parent.document.getElementById("s_' . $_GET['id'] . '").innerHTML';
if( strstr($_GET['url'],$_GET['my_url']) ) {
echo '';
} else if( !stristr($_GET['url'],'http://') ) {
echo '';
} else {
$s = my_file_get_contents($_GET['url']);
if( trim($s) == '' ){
echo '';
} else if( stristr($s,$_GET['my_url']) ){
echo '';
} else {
echo '';
}
}
if($_GET['auto_check']==1){
echo '';
}
exit('
done!');
}
?>
友情链接自动检查程序
我们很BS这样的人,当时双方都交换了首页链接,但对方却随意取消和您交换的友情链接(即对方去掉您网站的链接,而您却还保留了它的链接)
有了本程序,您可以快速、自动的检查您的友情链接网址,查看对方的网站是否去掉了您的链接。
// 显示获取到的链接地址
if( isset($_POST['html_code']) && isset($_POST['my_url']) ){
preg_match_all("/]{1,}/isU",stripslashes($_POST['html_code']),$ary);
if( isset($ary[1]) && count($ary[1])>0 ){
echo '
开始检查 检查下列网址是否包含有 ' . $_POST['my_url'] . ' 的链接 | |||||||||
序号 | 被检查的网址 | 检查结果 | |||||||
' . ($i+1) . '. | ' . $ary[1][$i] . ' | ' . $check_str . ' |
}
echo '';
if( $_POST['auto_check']==1 ){
echo '';
}
}
?>
if(isset($_POST['html_code'])){
echo '
';
}
?>
我的友情连接: | |||||||||
Hao123 | 265 | 百度网址 | 建网站 | 雅虎网址 | baidu |
Google导航 | |||
搜狗网址 | |||||||||
其他测试链接: 163内部链接测试 |
相关文章
- thinkphp查询语句与关联查询的用法介绍 07-07
- thinkphp查询与实现like模糊查询 06-15
- php 快递查询及快递网点查询 01-23
- google 收录查询与pr 查询 php源码下载 03-10
- PHP 域名查询代码 01-11
- PHP导出数据超时的优化建议解读 10-31