文章生成器html,【转载】伪原创文章生成器源代码

[PHP] 纯文本查看 复制代码< ?php

#define the text file

#we will get the words from

$content_file = “content.txt”;

#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,

#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);

}

?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值