This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tarpit [2025/02/12 00:38] – Yuki | tarpit [2025/02/12 01:16] (current) – Yuki | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOCACHE~~ | ~~NOCACHE~~ | ||
<php> | <php> | ||
- | $count = 500; | + | // 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:// | ||
- | $words = explode(" | + | $dict = "/ |
+ | $count_min = 2000; | ||
+ | $count_max = 5000; | ||
+ | $linkcount_min = 2; | ||
+ | $linkcount_max = 8; | ||
+ | $paragraphs = 250; | ||
+ | |||
+ | // Config ends here, but the fun is only starting. | ||
+ | |||
+ | $words = explode(" | ||
$num_words = count($words); | $num_words = count($words); | ||
Line 11: | Line 22: | ||
{ | { | ||
$strs = explode(" | $strs = explode(" | ||
- | $nums = array_map(fn($s) => array_search($str, $words), $strs); | + | $nums = array_map(fn($s) => array_search($s, $words), $strs); |
$j=1; | $j=1; | ||
$seed = array_reduce($nums, | $seed = array_reduce($nums, | ||
Line 17: | Line 28: | ||
mt_srand($seed); | mt_srand($seed); | ||
- | for($i=0; | + | for($i=0; |
{ | { | ||
- | echo $words[mt_rand(0, | + | echo $words[mt_rand(0, |
} | } | ||
$links = []; | $links = []; | ||
- | for($i=1; | + | for($i=1; |
{ | { | ||
$nums = []; | $nums = []; |