| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Strip keywords from referring|
Anybody know a simple routine ( preferably PHP) to strip the keywords from the referring url and write them to the page?
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);
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved