HTTP REFERRALS
Posted: Tue Aug 05, 2003 1:18 pm
Okay, I'm using $_SERVER['HTTP_REFERER'] to track down where my visitors are coming from. I'm posting the results to a MySQL database, as well. Question is this: How do I trim the URL down so that I only capture the site or the site and page without all the extra garbage?
For example, I get this kind of stuff:
http://www.google.com/search?hl=en&lr=& ... ts&spell=1
Suppose I just want to trim off everything after google.com? I know there is a way to do this but I haven't had much luck.
For example, I get this kind of stuff:
http://www.google.com/search?hl=en&lr=& ... ts&spell=1
Suppose I just want to trim off everything after google.com? I know there is a way to do this but I haven't had much luck.