neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


tarpit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tarpit [2025/02/12 00:48] Yukitarpit [2025/02/12 01:16] (current) Yuki
Line 1: Line 1:
 ~~NOCACHE~~ ~~NOCACHE~~
- 
 <php> <php>
 +// This creates infinite links for crawler bots to follow, full of absolute nonsense so AI can choke on it. Basically, it just picks words from a dictionary at random from a set seed.
 +// Script by Yuki, licensed under LiLiQ-R. Feel free to use it on your site!
 +// http://yuki.social/wiki/
 +
 +$dict = "/usr/share/dict/american-english";
 $count_min = 2000; $count_min = 2000;
 $count_max = 5000; $count_max = 5000;
-$linkcount = 8;+$linkcount_min = 2; 
 +$linkcount_max = 8;
 $paragraphs = 250; $paragraphs = 250;
  
-$words = explode("\n", file_get_contents("/usr/share/dict/american-english"));+// Config ends here, but the fun is only starting. 
 + 
 +$words = explode("\n", file_get_contents($dict));
 $num_words = count($words); $num_words = count($words);
  
Line 27: Line 34:
  
 $links = []; $links = [];
-for($i=1;$i<=mt_rand(2,$linkcount);$i++)+for($i=1;$i<=mt_rand($linkcount_min,$linkcount_max);$i++)
 { {
   $nums = [];   $nums = [];
tarpit.1739339328.txt.gz · Last modified: 2025/02/12 00:48 by Yuki