homepage Welcome to WebmasterWorld Guest from 54.196.198.213
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Strip keywords from referring
BoneHeadicus




msg:1270021
 7:24 pm on Mar 17, 2001 (gmt 0)

Anybody know a simple routine ( preferably PHP) to strip the keywords from the referring url and write them to the page?

 

sugarkane




msg:1270022
 10:25 am on Mar 19, 2001 (gmt 0)

It depends on the search engine - you need to work out the format of the URL, and then do an ereg_replace to delete the parts you don't need. An example for Google would be:

<?
$kwds=ereg_replace("^http\:\/\/www\.google\.com\/search\?q=", "", $HTTP_REFERER);
$kwds=ereg_replace("\+", " ", $kwds);
echo($kwds);
?>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved