RE: [PHP] Random Link

From: Date: Tue, 15 Aug 2000 14:09:28 +0000
Subject: RE: [PHP] Random Link
Groups: php.general 
Request: Send a blank email to php-general+get-11803@lists.php.net to get a copy of this message
What I would do is code a web front end to a mysql database, where you can add/delete links, and give others the ability to do it also. There are plenty of tutorials on the web for this.. the ones at devshed.com are particularly good. Then I'm not 100% sure of the best way to go from here, (i.e. pulling the random link), but you could easily get the # of links in the database, generate a random number between 1 and maxnumberoflinks, and pull that link out of the database for displaying. That seems inefficient though, and I'm sure someone here has a better idea. Chad -----Original Message----- From: Shane McBride [mailto:sales@riversidedesigns.net] Sent: Tuesday, August 15, 2000 10:07 AM To: Php-General Subject: [PHP] Random Link I know I'll get blasted for posting this message, so I apologize. I am looking to create a script that will generate random links on a web page. I want the script to read the html files in the current directory. Then extract the page title from the html tags and display those titles as links on the html page. I am a novice at php and have no idea where to start. I think I can do it with hard coded links in an array, but I want it to be more dynamic because we add and delete pages frequently. I am not asking for someone to write the script. All I am asking is that someone points me in the correct direction. I searched the web for an example, but no luck. TIA, Shane

« previous php.general (#11803) next »