note 75568 added to function.parse-url
| From: | RobertHoath at osu1 dot php dot net | Date: | Tue, 05 Jun 2007 20:23:54 +0000 |
| Subject: | note 75568 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127240@lists.php.net to get a copy of this message | ||
To use this function to return a value rather than as an array -
<?php
$url = 'http://username:password@hostname/path?arg=value#anchor';
$url = parse_url($url);
echo $url['host'];
?>
You can replace 'host' with any of the stated array:
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)
----
Server IP: 194.145.210.3
Probable Submitter: 88.106.234.138
----
Manual Page -- http://www.php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/75568
Del: integrated -- https://master.php.net/note/delete/75568/integrated
Del: useless -- https://master.php.net/note/delete/75568/useless
Del: bad code -- https://master.php.net/note/delete/75568/bad+code
Del: spam -- https://master.php.net/note/delete/75568/spam
Del: non-english -- https://master.php.net/note/delete/75568/non-english
Del: in docs -- https://master.php.net/note/delete/75568/in+docs
Del: other reasons-- https://master.php.net/note/delete/75568
Reject -- https://master.php.net/note/reject/75568
Search -- https://master.php.net/manage/user-notes.php