Re: extracting the file name from the referrer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux