yeah something like that i think
example: i have a php file named"index.php" on the same directory i have a text document called "text.txt" when i visit the index.php page it gets a random quote from the text.txt file. this is the php code that i put on the index.php file for it to display a random text.txt file
<?php
// En: Begin PHP Code / Fr: Debut code PHP
/************************************************** ****************************\
* Random Text Version 1.0 *
* Copyright 2000 Frederic TYNDIUK (FTLS) All Rights Reserved. *
* E-Mail:
tyndiuk@ftls.org Script License: GPL *
* Created 02/28/2000 Last Modified 02/28/2000 *
* Scripts Archive at:
http://www.ftls.org/php/ *
************************************************** *****************************/
/************************************************** *****************************/
// Necessary Variables:
$RANDOM_TXT_FILE = "text.txt";
// En: Absolute path and name to file contain sentances text.
// Fr: Chemin absolu (complet) et Nom du fichier contenat les phrases.
// 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";
}
// En: End PHP Code
// Fr: Fin code PHP
?>
this is the text on the text.txt file
this is another random text
--NEXT--
this is a random text.
--NEXT--
so i want no to display a random text i want it to be able to see the next text like in another webpage. maybe using that kind of url that is automatically generated by php strings
hope it is more clearly