You are here: parse_url questioin « PHP Programming Language « IT news, forums, messages
parse_url questioin

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация