Re: Random Link

From: Date: Tue, 15 Aug 2000 14:08:19 +0000
Subject: Re: Random Link
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11802@lists.php.net to get a copy of this message
Shane McBride wrote: > 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. Take the php-manual at www.php.net. With "dir" you can search directorys. With "fopen" you can open files (see http://www.php.net/manual/ref.filesystem.php how to read the file into a string). Take the string, explode <TITLE> and </TITLE> Display the title with print. Hope this will be the right direction ;-) Regards Martin > > > TIA, > Shane > > ------------------------------------------------------------------------ > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#11802) next »