SEO 之:全自动全天候挂机给多个域名(站群)轮回发表外链 PHP,使用 PHP 结合 JavaScript 实现
一、建立一个文本 domains.txt 用于存放域名列表,一行一个域名,格式如下:
二、建立一个 PHP 文件 seo.php 代码如下
<?php set_time_limit(0); header("Content-type: text/html; charset=UTF-8"); //--------------相关设置------------------------------ $frame_top_refresh_time = 22; //刷新间隔秒数 $php_Self = $_SERVER['PHP_SELF']; //获取网页地址 //--------------域名相关------------------------------ $site = $_SERVER['HTTP_HOST']; $yuming_ini = dirname(__file__) . "/domains.txt"; $yuming_ini_file = file($yuming_ini); $yuming_count = count($yuming_ini_file); $yuming_firsttime = chop($yuming_ini_file[0]); //默认打开的域名 //--------------获取 URL 中参数------------------------ function getParams($url) { $refer_url = parse_url($url); $params = $refer_url['query']; $arr = array(); if (!empty($params)) { $paramsArr = explode('&', $params); foreach ($paramsArr as $k => $v) { $a = explode('=', $v); $arr[$a[0]] = $a[1]; } } return $arr; } if (isset($_GET["type"])) { $type = $_GET["type"]; } else { $type = "index"; } if (isset($_GET["domain"])) { $domain = $_GET["domain"]; } if (isset($_GET["loop_times"])) { $loop_times = $_GET["loop_times"]; } else { $loop_times = 1; } if ($type == "index") { if (isset($_GET["url"])) { $end_url = $_GET["url"]; $end_url = $end_url . "&time=" . $_GET["time"] . "&domain=" . $domain; } else { $end_url = 'http://seo.dmeng.net/seolink.html?index=0&time=30&domain=' . $yuming_firsttime; } $seo_html_index = <<< END <html> <head> <title>发表外链</title> </head> <frameset rows="15%, 85%" noresize="noresize" bordercolor="red" border=2> <frame src="{$php_Self}?type=top&loop_times=$loop_times&url={$end_url}" id="header" name = "header"> <frame src="{$end_url}" id="footer" name = "footer"> </frameset> </html> END; echo $seo_html_index; } elseif ($type == "top") { if (isset($_GET["url"])) { $url = $_GET["url"] . "&time=" . $_GET["time"] . "&domain=" . $domain; } else { $url = 'http://seo.dmeng.net/seolink.html?index=0&time=30&domain=' . $yuming; } $url_arr = getParams($url); $url_add_count = $url_arr["index"]; @intval($url_add_count); $yuming_id = @array_search($domain . "\r\n", $yuming_ini_file); if ($url_add_count >= 1135) { //判断已经发送的连接数 $url_add_count_jia10 = 0; $url_add_count = 0; if ($yuming_id < $yuming_count - 1) { //在 yuming.ini 不是最后一行 $domain_next = chop($yuming_ini_file[$yuming_id + 1]); } else { $domain_next = $yuming_firsttime; $loop_times = $loop_times + 1; } } else { if ($url_add_count == 1130) { $url_add_count_jia10 = $url_add_count + 5; } else { $url_add_count_jia10 = $url_add_count + 10; } $domain_next = $domain; } $end_url = 'http://seo.dmeng.net/seolink.html?index=' . $url_add_count_jia10 . '&time=30&domain=' . $domain_next; $seo_html_top = <<< END <center> <p>循环次数: {$loop_times} 当前域名: {$domain_next}</p> <p>已发送链接: {$url_add_count} 剩余刷新时间:<span id="refresh_time">{$frame_top_refresh_time}</span></p> </center> <script type="text/javascript"> function myrefresh() { window.parent.window.location.href="{$php_Self}?type=index&loop_times={$loop_times}&url={$end_url}"; } var refresh_time = document.getElementById("refresh_time").innerHTML; setTimeout('myrefresh()', refresh_time * 1000); var i = refresh_time - 1; var intervalid; intervalid = setInterval("fun()", 1000); function fun() { if (i == 0) { clearInterval(intervalid); } document.getElementById("refresh_time").innerHTML = i; i--; } </script> END; echo $seo_html_top; } ?>
把 domains.txt 和 seo.php 上传到 php 环境下,打开即可开始发外链了,go go go~~~
感谢 dmeng 提供收集的外链地址,虽然很多已经都过期了,但是还有很多能用