note 86611 added to function.parse-url
| From: | pbcomm at gmail dot com | Date: | Sun, 26 Oct 2008 04:55:17 +0000 |
| Subject: | note 86611 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145757@lists.php.net to get a copy of this message | ||
Modification to the code from:
theoriginalmarksimpson at gmail dot com
Change:
$r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?";
Replace with:
$r .= "(?:(?P<login>\w+):?(?P<pass>\w+)?@)?";
This will cover the case the only username is present in the url:
http://username@subdomain.domain.com/index.php?arg1=test#anchor
----
Server IP: 209.41.74.194
Probable Submitter: 24.185.19.153
----
Manual Page -- http://www.php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/86611
Del: integrated -- https://master.php.net/note/delete/86611/integrated
Del: useless -- https://master.php.net/note/delete/86611/useless
Del: bad code -- https://master.php.net/note/delete/86611/bad+code
Del: spam -- https://master.php.net/note/delete/86611/spam
Del: non-english -- https://master.php.net/note/delete/86611/non-english
Del: in docs -- https://master.php.net/note/delete/86611/in+docs
Del: other reasons-- https://master.php.net/note/delete/86611
Reject -- https://master.php.net/note/reject/86611
Search -- https://master.php.net/manage/user-notes.php