⽂章⽣成器html,【转载】伪原创⽂章⽣成器源代码[PHP] 纯⽂本查看 复制代码< ?php
#define the text file
#we will get the words from
$content_file = “”;
#split the string, using each space as a pointer
$words = split(” “, join(“”, file($content_file)));
srand((double) microtime()*1000000);
#define how many words can
#be in the title (actually,
html代码转链接
#thats the string we are going to optimize for)
$bh_title = rand(4,13);
$bh_real_title = ” “;
#here is the cycle for this random ‘title’
for($z=0;$z< $bh_title;$z++)
{
$index = rand(0, count($words)-1);
$array = array($bh_real_title, $words[$index]);
$bh_real_title = implode(” “, $array);
}
#here we can define the length of
#the content, I think 250-450 is good number, yeah ?
$length = rand(250,450);
$bh_real_content = ” “;
for($i=0;$i
{
$index = rand(0, count($words)-1);
$array = array($bh_real_content, $words[$index]);
$bh_real_content = implode(” “, $array);
}
?>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。