can anyone tell me from where i can get script like this http://mumbaihangout.org/rnd.php Code (markup):
<?php $urls = array('http://google.com', 'http://website.com', 'http://example.com'); headers_sent() ? die('<a href="' . $urls[rand(0, count($urls)-1)] . '">Go</a>') : header('Location: ' . $urls[rand(0, count($urls)-1)]); PHP:
I see: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done
Here's one: You need two files name this one random.php <?php $RANDOM_TXT_FILE = "data_file.php"; // Absolute path and name to file contain sentances text. // End Necessary Variables section /******************************************************************************/ srand((double)microtime()*1000000); if (file_exists($RANDOM_TXT_FILE)) { $arry_txt = preg_split("/--NEXT--/", join('', file($RANDOM_TXT_FILE))); echo $arry_txt[rand(0, sizeof($arry_txt) -1)]; } else { echo "Error: can't open $RANDOM_IMG_FILE file"; } ?> Code (markup): Name this one data_file.php This is where you store the random data seperated by /--NEXT--/ <a href="http://www.areawebsolutions.com">Web Solutions Link</a> /--NEXT--/ <a href="http://www.areawebsolutions.com">Web Solutions Link 2</a> /--NEXT--/ Web Solutions Text /--NEXT--/ Any text /--NEXT--/ any <html> code Code (markup): the random code only serves as examples. Replace with your own text or html