This PHP script will display the current page URL to your site's visitors.
<?php
/*****************
--Display Current Page URL
--More PHP Scripts at
--http://icecaves.net/tags/php
*****************/
if (!empty($_SERVER['HTTPS'])) {
$start = "https://";
}
else
{
$start = "http://";
}
$hostname = $_SERVER['SERVER_NAME'];
$url = $_SERVER['REQUEST_URI'];
echo "$start$hostname$url";
?>Code Preview:
http://icecaves.net/2010/10/display-current-page-url
Forum Board:
