Re: extracting the file name from the referrer
| From: | Richard Lynch | Date: | Mon, 20 Nov 2006 22:41:52 +0000 |
| Subject: | Re: extracting the file name from the referrer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244904@lists.php.net to get a copy of this message | ||
http://php.net/parse_url
On Fri, November 17, 2006 5:22 pm, John wrote:
> I need to extract just the filename from the referring url, stripping
> it of
> the path and any post vars on the end. there's got to be an easier way
> than
> this eh?
>
>
>
> $referrer = trim(strrchr(substr($_SERVER['HTTP_REFERER'],0,
> strpos($_SERVER['HTTP_REFERER'],"?")), "/"), "/")
>
>
>
> Thanks!
>
>
>
> -JP
>
>
>
>
>
>
>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?