The site developer can determine the desired content of the link to the web resource, and the search engine itself generates a query string to the site. In various cases, the address bar of a browser may contain more than just an indication of the protocol and domain name.
URL is a combination of important elements that can be used to form adequate content and collect statistics. Getting the address of the current page, parsed into essential components, is easy in PHP.
Main source of information
PHP offers a wide range of data to the developer when a page is requested by the browser. As soon as the visitor arrives at the site, a request is sent to the server, which fills the global PHP array - $_SERVER - with important information.

The address of the current page has a double meaning:
- for development purposes in code context;
- for content generation and statistics purposes.
In the first case, the values of $_SERVER['DOCUMENT_ROOT'] and $_SERVER['PHP_SELF'] arethe root of the site and the name of the requested page. Site folders that contain the necessary files are conveniently addressed relative to the site root, and not tied to absolute addresses. Knowing the name of the current page also makes sense.

In the second case, you can determine what content to display on the page, what language to use, what design, what to place for one reason or another.
Manage site via URL
Links to the site can be placed with the parameters and / or the desired start page. By placing different links on different third-party resources, you can get the address of the current page and the set of parameters that were specified through PHP.
For example, on the sites of one region of the country there are links to the site page 'visit.php' with the parameter 'region=1', on the sites of another region - 'statements.php' and the parameter 'call=phone'. There may be many options. Knowing what, where and why was posted, you can analyze visits, see where someone came from, and respond accordingly.

Using PHP, the address of the current page is obtained disassembled into components. You can parse the value of QUERY_STRING (parameter string), you can find out the protocol, port, time and other data.
Summarizing data from multiple hits, you can generate objective information about visitors and site performance.