[PHP-NOTES] note 130318 added to ref.url

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
How to get the full url/url components of the current page: 

$urlComponents = parse_url("https://example.com/article?id=17dgh6ej");
$scheme = $urlComponents['scheme']; /* http or https depends on the site */
$host = $urlComponents['host']; /* example.com */
$path = $urlComponents['path']; /* /article */
$query = $urlComponents['query']; /* id=17dgh6ej */
$url = sprintf("%s://%s%s?%s", $scheme, $host, $path, $query);
echo $url;
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 2405:201:a008:c128:157e:238e:5115:51ee)
----
Manual Page -- https://php.net/manual/en/ref.url.php
Edit        -- https://main.php.net/note/edit/130318
Del: integrated  -- https://main.php.net/note/delete/130318/integrated
Del: useless     -- https://main.php.net/note/delete/130318/useless
Del: bad code    -- https://main.php.net/note/delete/130318/bad+code
Del: spam        -- https://main.php.net/note/delete/130318/spam
Del: non-english -- https://main.php.net/note/delete/130318/non-english
Del: in docs     -- https://main.php.net/note/delete/130318/in+docs
Del: other reasons-- https://main.php.net/note/delete/130318
Reject      -- https://main.php.net/note/reject/130318
Search      -- https://main.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.