This is a very basic script I have put up and it does work.
Requirements:
Web server that supports PHP!
This is what you do:
Code: Select all
<?php
// Code by Jamie
if($_SERVER['QUERY_STRING'] == "")
{
$query_questionmark = "";
}
else
{
$query_questionmark = "?";
}
$pageaddress= "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$_SERVER['PHP_SELF'].$query_questionmark.$_SERVER['QUERY_STRING'];
// Done!
?>
If you enter the code above and want to write the page address on the page, add this underneath it.
Code: Select all
<?php
echo $pageaddress;
?>
If however you want to remove certain bits in the code feel free to do so.
I hope the code is helpful!
Please give me comments!
Many thanks,