lancey10 Posted March 23, 2006 Share Posted March 23, 2006 ok so i have a script that displays all files in a folder!here it is:[code]<? $dirpath = "./torrents"; $dh = opendir($dirpath); while (false !== ($file = readdir($dh))) { if (!is_dir("$dirpath/$file")) { $fileend = substr($file, -8); $fileend = strtolower($fileend);if ( $fileend == ".torrent" ) { // If you want you could merge this into one echo // The info button takes you to parse.php, which is the important part echo "<A HREF=\"parse.php?filename=$file\">info:</A><A HREF=\"$dirpath/$file\">$file</A><BR>"; }} } closedir($dh);?> [/code]Now i have 2 questions:1. How do i make a search engine that will search the folder and display the closest matches?2. Pagin that will only display 40 results per page! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.