note 112571 added to function.parse-url
| From: | utilmind | Date: | Mon, 01 Jul 2013 00:06:06 +0000 |
| Subject: | note 112571 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195412@lists.php.net to get a copy of this message | ||
parse_url doesn't works if the protocol doesn't specified. This seems like sandard, even
the youtube doesn't gives the protocol name when generates code for embedding which have a look
like "//youtube.com/etc".
So, to avoid bug, you must always check, whether the provided url has the protocol, and if not
(starts with 2 slashes) -- add the "http:" prefix.
----
Server IP: 69.147.83.199
Probable Submitter: 91.200.180.180
----
Manual Page -- http://php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/112571
Del: integrated -- https://master.php.net/note/delete/112571/integrated
Del: useless -- https://master.php.net/note/delete/112571/useless
Del: bad code -- https://master.php.net/note/delete/112571/bad+code
Del: spam -- https://master.php.net/note/delete/112571/spam
Del: non-english -- https://master.php.net/note/delete/112571/non-english
Del: in docs -- https://master.php.net/note/delete/112571/in+docs
Del: other reasons-- https://master.php.net/note/delete/112571
Reject -- https://master.php.net/note/reject/112571
Search -- https://master.php.net/manage/user-notes.php