,

// infinte random number links (?q=randomnumber) (show random links only to Y") // reads kws.txt // cached is disabled // Yahoo only: // 15 random links (may be altered in some cases) // get current character $char = $_SERVER["SCRIPT_NAME"]; $break = Explode('/', $char); $char = $break[count($break) - 1]; $char = Explode('.', $char); $char = $char[0]; $char = substr ($char, 1, 2); // if p1.html is called output all kws beginning with numbers if ($char == 1) { $char = "1 2 3 4 5 6 7 8 9 0"; } // function to gen content function gen_content(){ global $char; // check if UserAgent UA is Y/msn/ask and show random links only to those crawlers $ua = $_SERVER[HTTP_USER_AGENT]; $ua=strtoupper($ua); // make all upper case if(substr_count($ua, "SLURP")>0 || substr_count($ua, "MSNBOT")>0 || substr_count($ua, "LIVE")>0 || substr_count($ua, "MSN.COM")>0) // search text in ua - only upper case! { $allowlinks=1; } $kw = file("kws.txt"); for ($i=0; $i$i; $i++){ srand ((double)microtime()*1000000); $ran = rand(0, count($kw)-2); $kw[$ran] = $kw[$ran].".

"; $kw[$ran+1] = ucwords($kw[$ran+1]); } // make tags , random number $sen = rand(100, 200); // choose how many for ($i=0; $sen>$i; $i++){ srand ((double)microtime()*1000000); $ran = rand(0, count($kw)-2); $kw[$ran] = "".$kw[$ran].""; } // make

tags , random number $sen = rand(10, 20); // choose how many for ($i=0; $sen>$i; $i++){ srand ((double)microtime()*1000000); $ran = rand(0, count($kw)-2); $kw[$ran] = "

".$kw[$ran]."

"; } $kw_st = implode (" ", $kw); include ("ads.php"); include ("footer.php"); // generate random links - only for Y/msn/ask if ($allowlinks==1) { for ($i=0; $i<15; $i++) { $num = rand(9000, 9999999999); $rnd = $rnd.' '.$num.''; } } // generating html $content = ' '.$title.'
'.$ads.$kw_st.'
 
'.$rnd.'
'.$footer.' '; // ********* disabled cache writing // write cache // $handle = fopen("index.content.txt", "w"); // fwrite($handle, $content); echo $content; // end content gen function } // ****** disabled cache-check - content is everytime generated new! // if cache exists: echo it -- else: run function gen_content() gen_content(); // $f = "index.content.txt"; // if (file_exists($f)){ echo file_get_contents($f).$rnd.""; } else { gen_content(); } ?>