note 99490 added to function.parse-url
| From: | przemek at sobstel dot org | Date: | Thu, 19 Aug 2010 20:44:07 +0000 |
| Subject: | note 99490 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171865@lists.php.net to get a copy of this message | ||
If you want to get host, function will return NULL if you pass only host.
Example:
<?php
parse_url($url, PHP_URL_HOST);
?>
$url => value returned
http://example.com => string 'example.com' (length=11)
http://www.example.com =>string 'www.example.com'
(length=15)
http://www.example.com:8080 => string
'www.example.com' (length=15)
example.com => null
www.example.com => null
example.com:8080 => string 'example.com' (length=11)
www.example.com:8080 => string 'www.example.com' (length=15)
----
Server IP: 69.147.83.197
Probable Submitter: 217.23.3.223
----
Manual Page -- http://www.php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/99490
Del: integrated -- https://master.php.net/note/delete/99490/integrated
Del: useless -- https://master.php.net/note/delete/99490/useless
Del: bad code -- https://master.php.net/note/delete/99490/bad+code
Del: spam -- https://master.php.net/note/delete/99490/spam
Del: non-english -- https://master.php.net/note/delete/99490/non-english
Del: in docs -- https://master.php.net/note/delete/99490/in+docs
Del: other reasons-- https://master.php.net/note/delete/99490
Reject -- https://master.php.net/note/reject/99490
Search -- https://master.php.net/manage/user-notes.php