Re: Extracting just the filename from REQUEST_URI

From: Date: Wed, 28 Mar 2001 17:22:37 +0000
Subject: Re: Extracting just the filename from REQUEST_URI
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45931@lists.php.net to get a copy of this message
Better yet, Here's what I'm trying to do: If someone does a search in a search engine, let's say google... The user does a search for "foo" google returns my website with a link to "foo" which no longer exists (because I've moved it). How can I get the query string passed from google and put that into my search page? ie: User searches for "foo" Google returns http://www.gdd.net/somedir/somedir/file.html User clicks on the link and gets a 404.html page The 404.html page gets the string that the user was searching on and passes that into a search form on my website. <form action="search.php" method="post"> Search: <input type="text" name="search" value="$SEARCH"> </form> Where $SEARCH was the search that the user entered in Google. How can I do this? Clayton Dukes --------------------------------------------------------------------- Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net ----- Original Message ----- From: Clayton Dukes To: php-general@lists.php.net Sent: Wednesday, March 28, 2001 12:11 PM Subject: [PHP] Extracting just the filename from REQUEST_URI I have a REQUEST_URI that comes in, REQUEST_URI=//training/olddata/file.htm How can I extract just the filename? ( $str=file.htm) Clayton Dukes --------------------------------------------------------------------- Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net ------------------------------------------------------------------------------ -- 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 (#45931) next »