伪原创文章生成器源代码

很多SEOer都喜欢伪原创,市面上也有很多伪原创文章的生成器,可能大家都在用。但可能很少有人知道伪原创文章是怎么生成的。

今天给大家介绍一个很简单的伪原创文章的代码,如下:

  1. < ?php
  2. #define the text file
  3. #we will get the words from
  4. $content_file = “content.txt”;
  5. #split the string, using each space as a pointer
  6. $words = split(” “, join(“”, file($content_file)));
  7. srand((double) microtime()*1000000);
  8. #define how many words can
  9. #be in the title (actually,
  10. #thats the string we are going to optimize for)
  11. $bh_title = rand(4,13);
  12. $bh_real_title = ” “;
  13. #here is the cycle for this random ‘title’
  14. for($z=0;$z$bh_title;$z++)
  15. {
  16. $index = rand(0, count($words)-1);
  17. $array = array($bh_real_title$words[$index]);
  18. $bh_real_title = implode(” “, $array);
  19. }
  20. #here we can define the length of
  21. #the content, I think 250-450 is good number, yeah ?
  22. $length = rand(250,450);
  23. $bh_real_content = ” “;
  24. for($i=0;$i<$length;$i++)
  25. {
  26. $index = rand(0, count($words)-1);
  27. $array = array($bh_real_content$words[$index]);
  28. $bh_real_content = implode(” “, $array);
  29. }
  30. ?>

相信懂点php的人一看就明白了。就是整了很多文章,放在一个文件里,然后随机取一些文字,做title和content。当然,title和content的长度你可以自己设定,你还可以设置自己希望生产的其他内容,如keywords,description等。在你希望输出生产的伪原创内容的地方放上如下代码就可以了:标题处放:< ?php echo $bh_real_title; ?>内容处放:< ?php echo $bh_real_content; ?>一个最简单的伪原创工具就这样完成了。你可以自己看一下效果。

© 版权声明
THE END
点赞4赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容