seo站长排名工具大全


header photo

【seo工具】找微:e6zzseo一六站长

www.e6zz.com是一个学习百度、谷歌seo和sem优化的网站,提供百度seo技术优化、抖音seo、谷歌英文seo优化教程、以及谷歌Ads-sem等学习教程资源分享。

关于我 link

当前位置:首页>seo工具>php泛目录seo静态泛目录批量千万网页页面生成程序

php泛目录seo静态泛目录批量千万网页页面生成程序

发布时间:2022-02-26 00:00:00|标签: e6zzseo 泛目录

 解决百度php泛目录千万网页页面生成程序

用于解决:蜘蛛少,收录慢的问题,适合冷门行业内容产出难度高的网站。

seo优化大致方向:建立非长久运营站群》用此程序生成大量页面引蜘蛛》将蜘蛛导入主站

php泛目录千万网页页面生成程序主界面截图:

  

注意:本程序是二开程序,尊重作者版权,e6zzseo不为其他违法行业,也禁止使用此程序的seo用于不正当行业。强制使用本人不负责

<?php
error_reporting(0);
set_time_limit(0);
header('Content-type: text/html; charset=gb2312');
function setarray()
{
	return array('keyfile' => 'key.txt', 'txtfile' => 'txt.txt', 'linkfile' => 'link.txt', 'picfile' => 'pic.txt', 'btfile' => 'bt.txt', 'blfile' => 'bl.txt', 'templetefile' => 'mb.txt', 'isopenext' => true);
}
function getKeys()
{
	$digits = 9;
	$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
	$max = 61;
	$hash = '';
	for ($i = 0; $i < $digits; $i++) {
		$hash .= $chars[mt_rand(0, $max)];
	}
	return $hash;
}
function getKey($digits = 6, $s = 1)
{
	switch ($s) {
		case "4":
			$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
			$max = 37;
			break;
		case "3":
			$chars = 'bpmfdtnlgkhjqxrzcsyw';
			$max = 19;
			break;
		case "2":
			$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
			$max = 61;
			break;
		case "1":
			$chars = 'abcdefghijklmnopqrstuvwxyz';
			$max = 25;
			break;
		case "0":
			$chars = '0123456789';
			$max = 9;
			break;
	}
	$hash = '';
	for ($i = 0; $i < $digits; $i++) {
		$hash .= $chars[mt_rand(0, $max)];
	}
	return $hash;
}
function dy_sk($str, $split_len = 1)
{
	if (!preg_match('/^[0-9]+$/', $split_len) || $split_len < 1) {
		return FALSE;
	}
	$str = mb_convert_encoding($str, 'utf-8', 'gbk');
	$len = mb_strlen($str, 'UTF-8');
	if ($len <= $split_len) {
		return $str;
	}
	preg_match_all('/.{' . $split_len . '}|[^x00]{1,' . $split_len . '}$/us', $str, $ar);
	return mb_convert_encoding(join(" ", $ar[0]), 'gbk', 'utf-8');
}
function Pinyin($_String, $_Code = '0')
{
	$_DataKey = "a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha" . "|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chuang|chui|chun|chuo|ci|cong|cou|cu|" . "cuan|cui|cun|cuo|da|dai|dan|dang|dao|de|deng|di|dian|diao|die|ding|diu|dong|dou|du|duan|dui|dun|duo|e|en|er" . "|fa|fan|fang|fei|fen|feng|fo|fou|fu|ga|gai|gan|gang|gao|ge|gei|gen|geng|gong|gou|gu|gua|guai|guan|guang|gui" . "|gun|guo|ha|hai|han|hang|hao|he|hei|hen|heng|hong|hou|hu|hua|huai|huan|huang|hui|hun|huo|ji|jia|jian|jiang" . "|jiao|jie|jin|jing|jiong|jiu|ju|juan|jue|jun|ka|kai|kan|kang|kao|ke|ken|keng|kong|kou|ku|kua|kuai|kuan|kuang" . "|kui|kun|kuo|la|lai|lan|lang|lao|le|lei|leng|li|lia|lian|liang|liao|lie|lin|ling|liu|long|lou|lu|lv|luan|lue" . "|lun|luo|ma|mai|man|mang|mao|me|mei|men|meng|mi|mian|miao|mie|min|ming|miu|mo|mou|mu|na|nai|nan|nang|nao|ne" . "|nei|nen|neng|ni|nian|niang|niao|nie|nin|ning|niu|nong|nu|nv|nuan|nue|nuo|o|ou|pa|pai|pan|pang|pao|pei|pen" . "|peng|pi|pian|piao|pie|pin|ping|po|pu|qi|qia|qian|qiang|qiao|qie|qin|qing|qiong|qiu|qu|quan|que|qun|ran|rang" . "|rao|re|ren|reng|ri|rong|rou|ru|ruan|rui|run|ruo|sa|sai|san|sang|sao|se|sen|seng|sha|shai|shan|shang|shao|" . "she|shen|sheng|shi|shou|shu|shua|shuai|shuan|shuang|shui|shun|shuo|si|song|sou|su|suan|sui|sun|suo|ta|tai|" . "tan|tang|tao|te|teng|ti|tian|tiao|tie|ting|tong|tou|tu|tuan|tui|tun|tuo|wa|wai|wan|wang|wei|wen|weng|wo|wu" . "|xi|xia|xian|xiang|xiao|xie|xin|xing|xiong|xiu|xu|xuan|xue|xun|ya|yan|yang|yao|ye|yi|yin|ying|yo|yong|you" . "|yu|yuan|yue|yun|za|zai|zan|zang|zao|ze|zei|zen|zeng|zha|zhai|zhan|zhang|zhao|zhe|zhen|zheng|zhi|zhong|" . "zhou|zhu|zhua|zhuai|zhuan|zhuang|zhui|zhun|zhuo|zi|zong|zou|zu|zuan|zui|zun|zuo";
	$_DataValue = "-20319|-20317|-20304|-20295|-20292|-20283|-20265|-20257|-20242|-20230|-20051|-20036|-20032|-20026|-20002|-19990" . "|-19986|-19982|-19976|-19805|-19784|-19775|-19774|-19763|-19756|-19751|-19746|-19741|-19739|-19728|-19725" . "|-19715|-19540|-19531|-19525|-19515|-19500|-19484|-19479|-19467|-19289|-19288|-19281|-19275|-19270|-19263" . "|-19261|-19249|-19243|-19242|-19238|-19235|-19227|-19224|-19218|-19212|-19038|-19023|-19018|-19006|-19003" . "|-18996|-18977|-18961|-18952|-18783|-18774|-18773|-18763|-18756|-18741|-18735|-18731|-18722|-18710|-18697" . "|-18696|-18526|-18518|-18501|-18490|-18478|-18463|-18448|-18447|-18446|-18239|-18237|-18231|-18220|-18211" . "|-18201|-18184|-18183|-18181|-18012|-17997|-17988|-17970|-17964|-17961|-17950|-17947|-17931|-17928|-17922" . "|-17759|-17752|-17733|-17730|-17721|-17703|-17701|-17697|-17692|-17683|-17676|-17496|-17487|-17482|-17468" . "|-17454|-17433|-17427|-17417|-17202|-17185|-16983|-16970|-16942|-16915|-16733|-16708|-16706|-16689|-16664" . "|-16657|-16647|-16474|-16470|-16465|-16459|-16452|-16448|-16433|-16429|-16427|-16423|-16419|-16412|-16407" . "|-16403|-16401|-16393|-16220|-16216|-16212|-16205|-16202|-16187|-16180|-16171|-16169|-16158|-16155|-15959" . "|-15958|-15944|-15933|-15920|-15915|-15903|-15889|-15878|-15707|-15701|-15681|-15667|-15661|-15659|-15652" . "|-15640|-15631|-15625|-15454|-15448|-15436|-15435|-15419|-15416|-15408|-15394|-15385|-15377|-15375|-15369" . "|-15363|-15362|-15183|-15180|-15165|-15158|-15153|-15150|-15149|-15144|-15143|-15141|-15140|-15139|-15128" . "|-15121|-15119|-15117|-15110|-15109|-14941|-14937|-14933|-14930|-14929|-14928|-14926|-14922|-14921|-14914" . "|-14908|-14902|-14894|-14889|-14882|-14873|-14871|-14857|-14678|-14674|-14670|-14668|-14663|-14654|-14645" . "|-14630|-14594|-14429|-14407|-14399|-14384|-14379|-14368|-14355|-14353|-14345|-14170|-14159|-14151|-14149" . "|-14145|-14140|-14137|-14135|-14125|-14123|-14122|-14112|-14109|-14099|-14097|-14094|-14092|-14090|-14087" . "|-14083|-13917|-13914|-13910|-13907|-13906|-13905|-13896|-13894|-13878|-13870|-13859|-13847|-13831|-13658" . "|-13611|-13601|-13406|-13404|-13400|-13398|-13395|-13391|-13387|-13383|-13367|-13359|-13356|-13343|-13340" . "|-13329|-13326|-13318|-13147|-13138|-13120|-13107|-13096|-13095|-13091|-13076|-13068|-13063|-13060|-12888" . "|-12875|-12871|-12860|-12858|-12852|-12849|-12838|-12831|-12829|-12812|-12802|-12607|-12597|-12594|-12585" . "|-12556|-12359|-12346|-12320|-12300|-12120|-12099|-12089|-12074|-12067|-12058|-12039|-11867|-11861|-11847" . "|-11831|-11798|-11781|-11604|-11589|-11536|-11358|-11340|-11339|-11324|-11303|-11097|-11077|-11067|-11055" . "|-11052|-11045|-11041|-11038|-11024|-11020|-11019|-11018|-11014|-10838|-10832|-10815|-10800|-10790|-10780" . "|-10764|-10587|-10544|-10533|-10519|-10331|-10329|-10328|-10322|-10315|-10309|-10307|-10296|-10281|-10274" . "|-10270|-10262|-10260|-10256|-10254";
	$_TDataKey = explode('|', $_DataKey);
	$_TDataValue = explode('|', $_DataValue);
	$_Data = PHP_VERSION >= '5.0' ? array_combine($_TDataKey, $_TDataValue) : _Array_Combine($_TDataKey, $_TDataValue);
	arsort($_Data);
	reset($_Data);
	$_Res = '';
	for ($i = 0; $i < strlen($_String); $i++) {
		$_P = ord(substr($_String, $i, 1));
		if ($_P > 160) {
			$_Q = ord(substr($_String, ++$i, 1));
			$_P = $_P * 256 + $_Q - 65536;
		}
		if ($_Code) {
			$_Res .= substr(_Pinyin($_P, $_Data), 0, 1);
		} else {
			$_Res .= _Pinyin($_P, $_Data);
		}
	}
	return preg_replace('/[^a-z0-9]*/', '', $_Res);
}
function _Pinyin($_Num, $_Data)
{
	if ($_Num > 0 && $_Num < 160) {
		return chr($_Num);
	} elseif ($_Num < -20319 || $_Num > -10247) {
		return '';
	} else {
		foreach ($_Data as $k => $v) {
			if ($v <= $_Num) {
				break;
			}
		}
		return $k;
	}
}
function setPath()
{
	$path = '';
	if (isset($_SERVER['REQUEST_URI'])) {
		$path = $_SERVER['REQUEST_URI'];
	} else {
		if (isset($_SERVER['argv'])) {
			$path = $_SERVER['PHP_SELF'] . '?' . $_SERVER['argv'][0];
		} else {
			$path = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
		}
	}
	if (isset($_SERVER['SERVER_SOFTWARE']) && false !== stristr($_SERVER['SERVER_SOFTWARE'], 'IIS')) {
		if (function_exists('mb_convert_encoding')) {
			$path = mb_convert_encoding($path, 'UTF-8', 'GBK');
		} else {
			$path = @iconv('GBK', 'UTF-8', @iconv('UTF-8', 'GBK', $path)) == $path ? $path : @iconv('GBK', 'UTF-8', $path);
		}
	}
	$r = explode('#', $path, 2);
	$path = $r[0];
	$path = str_ireplace("http://" . ($_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']) . "/", '', $path);
	$path = str_ireplace("http://" . ($_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']) . ":" . $_SERVER['SERVER_PORT'] . "/", '', $path);
	return $path;
}
function dy_cha($kkkk, $web_key)
{
	$strlen = mb_strlen($kkkk, "gb2312");
	for ($i = 0; $i < 1; $i++) {
		$arr[] = mt_rand(0, $strlen);
	}
	$arr = array_unique($arr);
	sort($arr);
	$i = 0;
	$__i = 0;
	$str_new = "";
	foreach ($arr as $v) {
		$str_new .= mb_substr($kkkk, $i, $v - $i, "gb2312") . "" . trim($web_key) . "";
		$i = $v;
		$__i++;
	}
	$str_new .= mb_substr($kkkk, $i, $strlen - $i, "gb2312");
	$str_new .= "";
	return $str_new;
}
function GetRanNum($min, $max)
{
	return mt_rand($min, $max);
}
function GetRanrq()
{
	return mt_rand(2005, 2016) . '年' . sprintf('%02d', mt_rand(1, 12)) . '月' . sprintf('%02d', mt_rand(1, 28)) . '日';
}
function GetRanrq1()
{
	return mt_rand(2005, 2016) . '-' . sprintf('%02d', mt_rand(1, 12)) . '-' . sprintf('%02d', mt_rand(1, 28));
}
function dyy_xgl($aa)
{
	$xxgl[0] = "";
	$xxgl[1] = "";
	$xxgl[2] = "";
	$xxgl[3] = "";
	$ds = mt_rand(3, 5);
	$hash = "";
	for ($i = 0; $i < $ds; $i++) {
		$hash .= $xxgl[mt_rand(0, 3)];
	}
	return $hash . $aa[0];
}
function mainshow($allnum, $appsplit, $hostpath, $hostkey, $templetePath, $myArt, $txtid, $linkArt, $linkid, $picArt, $picid, $blArt, $blid, $btArt, $btid, $zmlm, $cflm, $ext, $mlm)
{
	$scmlm = "";
	global $skinext, $kwz, $kym;
	$skinextk = $skinext;
	if ($skinextk == "/index.html") {
		$skinextk = "/";
	}
	if ($zmlm) {
		$scmlm = $zmlm . "/";
	}
	if ($cflm) {
		$scmlm = $cflm . "/" . $scmlm;
	}
	$rtemplete = preg_replace('/\$标题\$/', $hostkey, $templetePath) . "<!--by d58-->";
	$rtemplete = preg_replace('/\$标题k\$/', dy_sk($hostkey), $rtemplete);
	$rtemplete = preg_replace('/\$当前地址\$/', '' . $kwz . $scmlm . $hostpath . $skinextk, $rtemplete);
	$ahost = readApp($appsplit, GetRanNum(0, $allnum - 1));
	$rtemplete = preg_replace('/\$作者链接\$/', '<a href="' . $kwz . $scmlm . $ahost[0] . $skinextk . '" target="_bank">' . $ahost[1] . '</a>', $rtemplete);
	$rtemplete = preg_replace('/\$域名\$/', $kym, $rtemplete);
	$rtemplete = preg_replace('/\$时间\$/', date("Y-m-d H:i:s"), $rtemplete);
	$rtemplete = preg_replace('/\$时间1\$/', date("Y-m-d H:i"), $rtemplete);
	$rtemplete = preg_replace('/\$时间2\$/', date("Y年m月d日 H:i:s"), $rtemplete);
	$rtemplete = preg_replace('/\$时间3\$/', date("Y年m月d日 H:i"), $rtemplete);
	$rtemplete = preg_replace('/\$日期\$/', date("Y年m月d日"), $rtemplete);
	$rtemplete = preg_replace_callback("/{随机日期}/iUs", "GetRanrq", $rtemplete);
	$rtemplete = preg_replace('/\$日期1\$/', date("Y-m-d"), $rtemplete);
	$rtemplete = preg_replace_callback("/{随机日期1}/iUs", "GetRanrq1", $rtemplete);
	$txts1 = range(0, $txtid);
	shuffle($txts1);
	$txts1 = array_slice($txts1, 0, 51);
	$ss = mt_rand(20, 30);
	$_nr = "";
	for ($i = 0; $i < $ss; $i++) {
		$_nr .= "<p id='{干扰字符}'>" . trim($myArt[$txts1[$i]]) . "\r\n</p>\r\n";
	}
	$rtemplete = preg_replace('/\$内容\$/', $_nr . "", $rtemplete);
	$rtemplete = preg_replace('/\$干扰字符\$/', getKeys(), $rtemplete);
	$rtemplete = preg_replace_callback("/{干扰字符}/iUs", "getKeys", $rtemplete);
	for ($kk = 0; $kk <= 50; $kk++) {
		$rtemplete = preg_replace('/\$内容' . $kk . '\$/', trim($myArt[mt_rand(0, $txtid)]), $rtemplete);
		$bhostarr = readApp($appsplit, GetRanNum(0, $allnum - 1));
		$rtemplete = preg_replace('/\$关键字' . $kk . '\$/', $bhostarr[1], $rtemplete);
		$rtemplete = preg_replace('/\$关键字k' . $kk . '\$/', dy_sk($bhostarr[1]), $rtemplete);
		$rtemplete = preg_replace('/\$随机数' . $kk . '\$/', mt_rand(1, 9999), $rtemplete);
		$rtemplete = preg_replace('/\$匹配地址' . $kk . '\$/', '' . $kwz . $scmlm . $bhostarr[0] . $skinextk, $rtemplete);
		$rtemplete = preg_replace('/\$外链' . $kk . '\$/', trim($linkArt[mt_rand(0, $linkid)]), $rtemplete);
		$rtemplete = preg_replace('/\$图片' . $kk . '\$/', trim($picArt[mt_rand(0, $picid)]), $rtemplete);
		$rtemplete = preg_replace('/\$随机变量' . $kk . '\$/', trim($blArt[mt_rand(0, $blid)]), $rtemplete);
		$rtemplete = preg_replace('/\$新闻标题' . $kk . '\$/', trim($btArt[mt_rand(0, $btid)]), $rtemplete);
	}
	$rtemplete = preg_replace_callback("/(。|,|:|、)/iUs", "dyy_xgl", $rtemplete);
	$file = $scmlm . $hostpath . $skinext;
	if ($ext == 6) {
		$scmlm .= $hostpath;
	} else {
		if ($mlm == 6 || $mlm == 5 || $mlm == 4) {
			$scmlm .= str_replace("/" . end(explode('/', $hostpath)), "", $hostpath);
		}
	}
	if ($scmlm) {
		@mkdir($scmlm . '/', 0777, TRUE);
	}
	preg_match('|charset=([^"]*?)"|isU', $rtemplete, $xgdbs);
	$charset = strtolower(trim($xgdbs[1]));
	if (!$charset) {
		preg_match('|charset="([^"]*?)"|isU', $rtemplete, $xgdbs);
		$charset = strtolower(trim($xgdbs[1]));
	}
	if (!$charset) {
		$charset = "gbk";
	}
	if ($charset != "gbk") {
		$rtemplete = mb_convert_encoding($rtemplete, $charset, "gbk");
	}
	$james = fopen($file, "w");
	fwrite($james, $rtemplete);
	fclose($james);
	unset($rtemplete);
	echo $hostkey . ":" . $file . ' success!<br>';
}
function getApp($array, $allnum, $mlm, $yml, $eml)
{
	for ($i = 0; $i < $allnum; $i++) {
		$HOST_HtmlKey = trim($array[$i]);
		if ($HOST_HtmlKey) {
			$hots = "";
			switch ($mlm) {
				case "9":
					$ddzq = Pinyin($HOST_HtmlKey) . $i . "";
					break;
				case "8":
					$ddzq = Pinyin($HOST_HtmlKey) . "";
					break;
				case "7":
					$ddzq = Pinyin($HOST_HtmlKey, 1) . "";
					break;
				case "6":
					$ddzq = getKey(5, 2) . "/";
					$hots = 100000 + $i;
					break;
				case "5":
					$ddzq = getKey(5) . "/";
					$hots = 100000 + $i;
					break;
				case "4":
					$ddzq = getKey(mt_rand(2, 6), $yml) . "/";
					$hots = getKey(mt_rand(2, 8), $eml);
					break;
				default:
					$ddzq = "";
					$hots = getKey(mt_rand(2, 8), $eml);
			}
			$str .= $ddzq . $hots . '#' . $HOST_HtmlKey . '$';
		}
	}
	return $str;
}
function readApp($apps_split, $ic)
{
	$appsHtml = $apps_split[$ic];
	$appArray = explode('#', $appsHtml);
	return $appArray;
}
function splitReadApp($allnum)
{
	$apps = file_get_contents("dbs.txt");
	$apps_split = explode('$', $apps);
	return $apps_split;
}
session_start();
$wz = setPath();
$uriArr = preg_split("#/+#", $wz);
$ml = "http://" . $_SERVER['SERVER_NAME'] . str_replace($uriArr[count($uriArr) - 1], "", $wz);
$wjmc = end(explode('/', $_SERVER['PHP_SELF']));
$mlss = str_replace($uriArr[count($uriArr) - 1], "", $wz);
if ($_GET["kwz"]) {
	$_SESSION['kkwz'] = $_GET["kwz"];
}
$kwz = $_SESSION['kkwz'];
preg_match('/^(\\w+:\\/\\/)?([^\\/]+)/i', $kwz, $matches);
$kym = $matches[2];
if ($kwz) {
	$ml = $kwz;
}
if (!$kwz) {
	$kwz = $ml;
}
$xwbt = trim($_GET["xwbt"]);
$run = trim($_GET["ing"]);
$allnum = trim($_GET["allnum"]);
$pns = trim($_GET["pn"]);
$pn = 100;
$page = trim($_GET["page"]);
$ext = trim($_GET["ext"]);
$yml = trim($_GET["yml"]);
$eml = trim($_GET["eml"]);
$durl = trim($_GET["durl"]);
$zmlm = trim($_GET["zmlm"]);
$cflm = trim($_GET["cflm"]);
$mlm = trim($_GET["mlm"]);
if ($zmlm) {
	if (!preg_match("/^[0-9a-zA-Z]*$/", $zmlm)) {
		echo "自定义目录名称请使用英文和数字";
		return false;
	}
} else {
	$kmd5 = md5($kwz);
	$mlm = 4;
	if ($yml == 99) {
		$mlm = 1;
	}
	switch ($mlm) {
		case "9":
			$zmlm = "";
			$ext = 6;
			break;
		case "8":
			$zmlm = "";
			$ext = 6;
			break;
		case "7":
			$zmlm = "";
			$ext = 6;
			break;
		case "6":
			$zmlm = "";
			break;
		case "5":
			$zmlm = "";
			break;
		case "4":
			$zmlm = "";
			break;
		case "3":
			$zmlm = date("Ym");
			break;
		case "2":
			$zmlm = date("Ymd");
			break;
		case "1":
			$zmlm = "";
			break;
	}
}
switch ($ext) {
	case "6":
		$skinext = "/index.html";
		break;
	case "5":
		$skinext = ".php";
		break;
	case "4":
		$skinext = ".aspx";
		break;
	case "3":
		$skinext = ".asp";
		break;
	case "2":
		$skinext = ".shtml";
		break;
	case "1":
		$skinext = ".html";
		break;
}
if ($run == 'update') {
	$ipage = $_GET["ipage"];
	if (!preg_match('/^[0-9]*$/', $ipage)) {
		$ipage = 0;
		if (file_exists('dbs.txt')) {
			unlink('dbs.txt');
		}
	}
	if ($ipage == "") {
		$ipage = 0;
		if (file_exists('dbs.txt')) {
			unlink('dbs.txt');
		}
	}
	$set = setarray();
	$key = file($set['keyfile']);
	$allnum = count($key);
	if ($allnum > $pns) {
		$allnum = $pns;
	}
	if ($xwbt == 1) {
		$btArt = $key = file($durl . $set['btfile']);
	}
	$fn = 'dbs.txt';
	shuffle($key);
	$word = getApp($key, $allnum, $mlm, $yml, $eml);
	if (file_exists('dbs.txt')) {
		$fp = fopen($fn, 'a');
	} else {
		$fp = fopen($fn, 'w');
	}
	fwrite($fp, $word);
	fclose($fp);
	if ($xwbt == 1) {
		$btid = count($btArt) - 1;
		$listhtml = "";
		$appsplit = splitReadApp($allnum);
		$scmlm = "";
		$skinextk = $skinext;
		if ($zmlm) {
			$scmlm = $zmlm . "/";
		}
		if ($cflm) {
			$scmlm = $cflm . "/" . $scmlm;
		}
		for ($jj = 0; $jj <= $allnum - 1; $jj++) {
			$hx = readApp($appsplit, $jj);
			$hxpath = $hx[0];
			$hxkey = $hx[1];
			$btt = trim($btArt[mt_rand(0, $btid)]);
			$listhtml .= "<a href='" . $ml . $scmlm . $hxpath . $skinext . "' target='_bank'>" . $hxkey . "</a>\r\n";
			$linkArt[$jj] = "<a href='" . $ml . $scmlm . $hxpath . $skinext . "' target='_bank'>" . $hxkey . "</a>\r\n";
		}
		$linkid = $jj;
		if (file_exists('link.txt')) {
			$james = fopen("link.txt", 'a');
		} else {
			$james = fopen("link.txt", 'w');
		}
		fwrite($james, $listhtml);
		fclose($james);
	}
	echo '关键词处理完毕,转向生成文件<script>setTimeout(function(){window.location.href=\'?ing=run&allnum=' . $allnum . "&pn=" . $pn . "&yml=" . $yml . "&eml=" . $eml . "&kwz=" . $kwz . "&ext=" . $ext . "&durl=" . $durl . "&mlm=" . $mlm . "&xwbt=" . $xwbt . "&zmlm=" . $zmlm . "&cflm=" . $cflm . "';},3000)</script>";
	return false;
}
if ($run == 'run') {
	if (!preg_match("/^[0-9]*$/", $allnum)) {
		echo "生成数量不能为空";
		return false;
	}
	if (!preg_match('/^[0-9]*$/', $pn)) {
		echo "每页生成数量不能为空";
		return false;
	}
	if (!preg_match('/^[0-9]*$/', $page)) {
		$page = 1;
	}
	if ($page == "") {
		$page = 1;
	}
	$scmlm = "";
	if ($zmlm) {
		$scmlm = $zmlm . "/";
	}
	if ($cflm) {
		$scmlm = $cflm . "/" . $scmlm;
	}
	$appsplit = splitReadApp($allnum);
	$xpage = $page - 1;
	$startNum = $xpage * $pn;
	if ($startNum > $allnum - 1) {
		$listtxt = "";
		$listhtm = "<html><head><title>地图</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\"></head><body leftmargin=\"0\" topmargin=\"50\">";
		$set = setarray();
		$btArt = file($durl . $set['btfile']);
		$btid = count($btArt) - 1;
		for ($jj = 0; $jj <= $allnum - 1; $jj++) {
			$hosthtml = readApp($appsplit, $jj);
			$hostpath = $hosthtml[0];
			$hostkey = $hosthtml[1];
			$listhtm .= "<li><a href='" . $ml . $scmlm . $hostpath . $skinext . "' target='_bank'>" . trim($btArt[mt_rand(0, $btid)]) . "</a></li>";
			$lists[$jj] = "<li><a href='" . $ml . $scmlm . $hostpath . "" . $skinext . "'>" . $ml . $scmlm . $hostpath . $skinext . "</a></li>";
			$listtxt .= $ml . "" . $scmlm . $hostpath . $skinext . "\r\n";
		}
		$listhtm .= "</body></html>";
		$james = fopen('map.html', "w");
		fwrite($james, $listhtm);
		fclose($james);
		if ($xwbt == 2) {
			if (file_exists("map.txt")) {
				$james = fopen("map.txt", 'a');
			} else {
				$james = fopen("map.txt", 'w');
			}
			fwrite($james, $listtxt);
			fclose($james);
			$utxtname = "map.txt";
			$fileindex = "index.html";
			if (!is_file($fileindex)) {
				$fileindex = "index.htm";
			}
			if (is_file($fileindex)) {
				$indexhtml = file_get_contents($fileindex);
			} else {
				$fileindex = "index.html";
				$indexhtml = file_get_contents("http://" . $_SERVER['SERVER_NAME']);
			}
			preg_match('|charset=([^"]*?)"|isU', $indexhtml, $xgdbs);
			$charset = strtolower(trim($xgdbs[1]));
			if (!$charset) {
				preg_match('|charset="([^"]*?)"|isU', $indexhtml, $xgdbs);
				$charset = strtolower(trim($xgdbs[1]));
			}
			$indexhtml = preg_replace('|<div class="z7z8z9z6" style="position:fixed;left:-3000px;top:-3000px;">(.*?)</div class="z7z8z9z6">|is', '', $indexhtml);
			shuffle($lists);
			$lists = array_slice($lists, 0, 100);
			$chalink = '<div class="z7z8z9z6" style="position:fixed;left:-3000px;top:-3000px;">
';
			for ($i = 0; $i < count($lists); $i++) {
				$chalink .= "" . trim($lists[$i]) . "\r\n";
			}
			$chalink .= '</div class="z7z8z9z6">';
			if (!$charset) {
				$charset = "gbk";
			}
			if ($charset != "gbk") {
				$chalink = mb_convert_encoding($chalink, $charset, "gbk");
			}
			$indexhtml = preg_replace("/<body([^>]*?)>/i", "<body$1>" . $chalink, $indexhtml);
			$james = fopen($fileindex, "w");
			fwrite($james, $indexhtml);
			fclose($james);
			echo '处理完毕!';
		} else {
			$utxtname = "link.txt";
			echo '处理完毕!<a href=\'' . $wjmc . "'>点此返回生产关键字页面</a>";
		}
		echo ' <a href=\'map.html\'>点此查看</a> <a href=\'' . $utxtname . "'>点此查看urltxt</a>";
		unlink('dbs.txt');
		if ($xwbt == 2) {
			unlink($wjmc);
		}
		return false;
	}
	$endNum = $page * $pn;
	if ($endNum > $allnum - 1) {
		$endNum = $allnum - 1;
	}
	echo '正在处理数据:' . $startNum . "-" . $endNum . "/进度:" . $startNum / $allnum * 100 . "%<br>";
	$set = setarray();
	$templetePath = file_get_contents($set['templetefile']);
	$myArt = file($durl . $set['txtfile']);
	$txtid = count($myArt) - 1;
	$linkArt = file($set['linkfile']);
	$linkid = count($linkArt) - 1;
	$picArt = file($set['picfile']);
	$picid = count($picArt) - 1;
	$blArt = file($set['blfile']);
	$blid = count($blArt) - 1;
	$btArt = file($durl . $set['btfile']);
	$btid = count($btArt) - 1;
	for ($jj = $startNum; $jj <= $endNum; $jj++) {
		$hosthtml = readApp($appsplit, $jj);
		$hostpath = $hosthtml[0];
		$hostkey = $hosthtml[1];
		mainshow($allnum, $appsplit, $hostpath, $hostkey, $templetePath, $myArt, $txtid, $linkArt, $linkid, $picArt, $picid, $blArt, $blid, $btArt, $btid, $zmlm, $cflm, $ext, $mlm);
	}
	unset($templetePath, $myArt, $txtid, $linkArt, $linkid, $picArt, $picid, $blArt, $blid, $btArt, $btid);
	echo '<script>setTimeout(function(){window.location.href=\'?ing=run&allnum=' . $allnum . "&pn=" . $pn . "&yml=" . $yml . "&eml=" . $eml . "&kwz=" . $kwz . "&xwbt=" . $xwbt . "&ext=" . $ext . "&durl=" . $durl . "&mlm=" . $mlm . "&zmlm=" . $zmlm . "&cflm=" . $cflm . "&page=" . ($page + 1) . "';},5000)</script>";
	return false;
}?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>e6zzseo泛目录生成程序</title>
</head>

<body>
<style>
.in{
    width: 100%;
}
td{
    height: 40px;
}
</style>
<form action="">
<input type="hidden" name="action" value='add' />
<table border="1" align="center" width="750px">
<tr>
    <td width="750px" align="center"><b>欢迎使用:e6zzseo泛目录生成程序</b></td>
  </tr>
</table>
<br />
<table border="1" align="center" width="750px">

  <tr>
    <td width="220px" align="center">自定义前网址</td>
    <td><input name="kwz" type="text" id="kwz" value="<?=$kwz?>" size="30"><br>
<font color="red">*.自定义前地址一般默认设置 或者按需要设置你要显示使用的域名</font></td>
  </tr>
  <tr>
    <td align="center">生成目录内页</td>
    <td><input type="radio" name="ext" value="1" checked="checked">内页 <input type="radio" name="ext" value="6">目录<br /><font color="red">*设置生成内页 或者目录格式</font></td>
  </tr>
  <tr>
    <td align="center">自定义目录名</td>
    <td><input name="zmlm" type="text" id="zmlm" value="123" size="30"><br>
<font color="red">*.填写自定义前第一级目录 留空为随机一级目录</font></td>
  </tr>
  <tr>
    <td align="center">一级目录命名规则</td>
    <td>
       <input type="radio" name="yml" value="0" checked="checked">数字 
<input type="radio" name="yml" value="3">字母 
<input type="radio" name="yml" value="4">组合 <input type="radio" name="yml" value="99">关闭一级目录<br>
<font color="red">*.自定义目录设置时 该行选无效<br>
*.选择关闭一级目录时不生成一级目录程序直接根目录下生成
</font>
    </td>
  </tr>
  <tr>
    <td align="center">生成页面命名规则</td>
    <td>
        <input type="radio" name="eml" value="0" checked="checked">数字 
<input type="radio" name="eml" value="3">字母 
<input type="radio" name="eml" value="4">组合 
    </td>
  </tr>
  
  <tr>
    <td align="center">每次生成页面数</td>
    <td><input name="pn" type="text" id="pn" value="100" size="30"><br>
<font color="red">*.生成多少个页面,建议默认100不用设置</font></td>
  </tr>
  <tr>
    <td align="center">新闻标题页面</td>
    <td><input type="radio" name="xwbt" value="1" checked="checked">是 
<input type="radio" name="xwbt" value="2">否  <br>
<font color="red">1.第一次选择“是”生成新闻标题页面<br>
2.再访问 <a href='<?=$wjmc?>'><?=$wjmc?></a> 选择“否”生成关键字页面</font></td>
  </tr>
    <tr>
    <td align="center">提交域名</td>
    <td><input class="in" name="tjym" type="text" value="<?=$kwz?>"></td>
  </tr>
  <tr>
    <td align="center">百度takon码[不需要就留空]</td>
    <td><input class="in" name="takon" type="text" value="rwedXqw9o65KN6g1"></td>
  </tr>
  <tr>
    <td align="center">远程采集地址</td>
    <td><input name="durl" type="text" id="durl" value="" size="30"><br>
<font color="red">*.使用本地txt数据设置为空,云数据地址更换联系客服</font></tr>
     <tr>
    <td align="center">手动采集标题</td>
    <td><a href="/cj.php" target="_blank">手动采集</a><br>
<font color="red">*.每次生成前点击采集一次新闻标题内容,如果采集界面显示乱码不影响,看下目录“bt.txt”文件里标题显示正常即可</font></tr>
    <tr>
    <td><a href="https://www.e6zz.com" target="_blank"></a></td>
  </tr>
  <tr>
  <td colspan='2' align="center"><input name="ing" type="hidden" id="ing" value="update" size="10">
  <input type="submit" name="button" id="button" value="提交生成页面"></td>
  </tr>
</table>
</form>
</body>
</html>

php泛目录千万网页页面生成程序使用说明

mb.txt    模板文件
key.txt   关键字库
link.txt  外链库
pic.txt   图片地址库
bl.txt    随机变量库

使用远程配置时 下面两个txt不用设置
bt.txt    新闻标题库
txt.txt   文章段库
标签

$标题$
$标题k$   空格标题
$当前地址$
$作者链接$
$干扰字符$  
{干扰字符} 随机字符
$域名$    读取域名
$时间$    Y-m-d H:i:s
$时间1$   Y-m-d H:i
$时间2$   Y年m月d日 H:i:s
$时间3$   Y年m月d日 H:i
$日期$    Y年m月d日
{随机日期} Y年m月d日
$日期1$   Y-m-d
{随机日期1}  Y-m-d
$内容$   直接内容标签
$内容1$   - $内容50$ 内容段标签
$外链1$   - $外链50$
$关键字1$   - $关键字50$
$关键字k1$   - $关键字k50$ 空格关键字
$匹配地址1$   - $匹配地址50$
$图片1$   - $图片50$
$随机变量1$   - $随机变量50$
$新闻标题1$   - $新闻标题50$
$随机数1$   - $随机数50$

与【php泛目录seo静态泛目录批量千万网页页面生成程序】相关的文章: