Welcome to WebmasterWorld Guest from 54.211.79.150

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Strip keywords from referring

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

Preferred Member

10+ Year Member

joined:Nov 25, 2000
posts:541
votes: 0


Anybody know a simple routine ( preferably PHP) to strip the keywords from the referring url and write them to the page?
10:25 am on Mar 19, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 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);
?>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members