据拳头SEO描述,本程序是做搜狗收录用的,新款的程序里面内置了php提交搜狗xml和翻译的接口,以及百度token推送的接口,只用宝塔定时任务访问,通过定时推送提高站点的抓取频次。

并且本程序的新版将源程序在原版php一键配置文件(configure.php)之外,增加了一个php控制页面,用户可以通过访问php来实现前天修改配置文件。前台展示效果如下图:

为分城市搜狗泛站群的配置文件增加php控制页面插图

增加方法

在本程序的根目录下新建一个control.php(最好自定义文件名),增加下文代码,访问站点域名/此PHP文件即可。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>设置页面</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
</head>
<body style="padding: 15px;">


<?php
require './configure.php';
if($_POST){
$astricts = $_POST['astrict'];
$citations = $_POST['citation'];
$spider_types = $_POST['spider_type'];
$spider_ips = $_POST['spider_ip'];
$chances = $_POST['chance'];
$link_types = $_POST['link_type'];
update_config("configure.php", "astrict", $astricts);
update_config("configure.php", "citation", $citations);
update_config("configure.php", "spider_type", $spider_types);
update_config("configure.php", "spider_ip", $spider_ips);
update_config("configure.php", "chance", $chances);
update_config("configure.php", "link_type", $link_types);
echo "<script language=JavaScript> location.replace(location.href);</script>";
}
if($_GET){
$str=$_GET['link'];
$fp=fopen("hret.txt","w");
fwrite($fp,$str);//写入
fclose($fp);
}
function update_config($file, $ini, $value,$type="string")
{
if(!file_exists($file)) return false;
$str = file_get_contents($file);
$str2 = "";
if($type == "int"){
$str2 = preg_replace("/".preg_quote($ini)."=(.*);/", $ini."=".$value.";",$str);
}
else{
$str2 = preg_replace("/".preg_quote($ini)."=(.*);/",$ini."=\"".$value."\";",$str);
}
file_put_contents($file, $str2);
}
?>
<form action="" class="layui-form" method="post">
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">蜘蛛池访问限制:</label>
<div>
<input type="radio" name="astrict" value="1" title="蜘蛛访问" <?php echo $astrict == 1 ? "checked" : ''; ?>>
<input type="radio" name="astrict" value="0" title="访客+蜘蛛访问" <?php echo $astrict == 0 ? "checked" : ''; ?>>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">开启蜘蛛强引功能:</label>
<div>
<input type="radio" name="citation" value="1" title="开启" <?php echo $citation == 1 ? "checked" : ''; ?>>
<input type="radio" name="citation" value="0" title="关闭" <?php echo $citation == 0 ? "checked" : ''; ?>>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">强引指定蜘蛛:</label>
<div>
<input type="radio" name="spider_type" value="1" title="百度蜘蛛" <?php echo $spider_type == 1 ? "checked" : ''; ?>>
<input type="radio" name="spider_type" value="3" title="搜狗蜘蛛" <?php echo $spider_type == 3 ? "checked" : ''; ?>>
<input type="radio" name="spider_type" value="2" title="360蜘蛛" <?php echo $spider_type == 2 ? "checked" : ''; ?>>
<input type="radio" name="spider_type" value="4" title="谷歌蜘蛛" <?php echo $spider_type == 4 ? "checked" : ''; ?>>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">强引指定蜘蛛IP:</label>
<div>
<input type="radio" name="spider_ip" value="1" title="开启" <?php echo $spider_ip == 1 ? "checked" : ''; ?>>
<input type="radio" name="spider_ip" value="0" title="关闭" <?php echo $spider_ip == 0 ? "checked" : ''; ?>>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">强引外链类型:</label>
<div>
<input type="radio" name="link_type" value="1" title="系统外链" <?php echo $link_type == 1 ? "checked" : ''; ?>>
<input type="radio" name="link_type" value="2" title="自定义外链" <?php echo $link_type == 2 ? "checked" : ''; ?>>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;color: red;">蜘蛛强引概率,1到100的概率设置,100为100%:</label>
<div>
<input type="text" name="chance" autocomplete="off" class="layui-input" value="<?php echo $chance; ?>">
</div>
</div>
<div class="layui-form-item">
<div>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-fluid">立即提交</button>
</div>
</div>
</form>
<br>
<form action="" class="layui-form" method="get">
<div class="layui-form-item layui-form-text">
<label style="margin-bottom: 15px;display: block;">自定义链接</label>
<div>
<textarea name="link" rows="8" placeholder="一行一条链接" class="layui-textarea"><?php echo file_get_contents('hret.txt');?></textarea>
</div>
</div>
<div class="layui-form-item">
<div>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-fluid">立即提交</button>
</div>
</div>
</form>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
</body>
</html>

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注