This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tarpit [2025/02/11 16:25] – Yuki | tarpit [2025/02/12 01:16] (current) – Yuki | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOCACHE~~ | ||
| <php> | <php> | ||
| - | $words = explode(" | + | // 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:// | ||
| + | |||
| + | $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); | ||
| $seed = 0; | $seed = 0; | ||
| - | $count = 500; | ||
| if(isset($_GET[" | if(isset($_GET[" | ||
| { | { | ||
| - | $seed = $_GET["_"]; | + | $strs = explode(" |
| + | $nums = array_map(fn($s) => array_search($s, | ||
| + | $j=1; | ||
| + | $seed = array_reduce($nums, | ||
| } | } | ||
| mt_srand($seed); | mt_srand($seed); | ||
| - | for($i=0; | + | for($i=0; |
| + | { | ||
| + | echo $words[mt_rand(0, | ||
| + | } | ||
| + | |||
| + | $links = []; | ||
| + | for($i=1; | ||
| { | { | ||
| - | | + | $nums = []; |
| + | $n = mt_rand(); | ||
| + | while($n > 0) | ||
| + | { | ||
| + | $nums[] = $n % $num_words; | ||
| + | $n = intdiv($n,$num_words); | ||
| + | } | ||
| + | $w = implode(" | ||
| + | |||
| + | $links[] = "<a href=\"? | ||
| } | } | ||
| + | echo "< | ||
| </ | </ | ||