note 27541 added to function.parse-url
| From: | danny at kyboshed dot com | Date: | Tue, 10 Dec 2002 11:07:00 +0000 |
| Subject: | note 27541 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40654@lists.php.net to get a copy of this message | ||
This breaks if the username contains an '@' sign:
<?php
$url=parse_url('http://me@abc.com:pass@xyz.org/page.php');
var_dump($url);
?>
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(7) "abc.com"
["user"]=>
string(2) "me"
["path"]=>
string(9) "/page.php"
}
array(5) {
["scheme"]=>
string(4) "http"
["host"]=>
string(7) "xyz.org"
["user"]=>
string(10) "me@abc.com"
["pass"]=>
string(4) "pass"
["path"]=>
string(9) "/page.php"
}
--
http://www.php.net/manual/en/function.parse-url.php
http://master.php.net/manage/user-notes.php?action=edit+27541
http://master.php.net/manage/user-notes.php?action=delete+27541
http://master.php.net/manage/user-notes.php?action=reject+27541