|
Posted by deko on 02/12/07 08:10
Why does this code fail?
$ref = http://example.com/?p=32
$ref_a = parse_url($ref);
echo ref_a['path']; //returns nothing
Does the '?' cause parse_url to fail?
I'm trying to capture a referrer in an user agent that contains a query string.
As a work-around, I'm using this:
$urlPath = stristr(substr($urlString, 9), '/');
Other alternatives?
Thanks in advance.
Navigation:
[Reply to this message]
|