PHP

PHP

PHP

How to get current page URL in PHP

Use the PHP snippet to create the current page URL. It will check if the URL is on a secure URL (https) or not (http). The code gets server name and port number if needed and the current page URL.