I want to be able to echo $URL where $URL is the URL of the page that is echoing it
Get the URL
Moderator: General Moderators
Get the URL
Ok here's the deal:
I want to be able to echo $URL where $URL is the URL of the page that is echoing it
. um...in other words...if I was at ebay.com...I would want to assign "http://www.ebay.com" to the variable $URL. Is this possible?
I want to be able to echo $URL where $URL is the URL of the page that is echoing it
well...thats really close. Is there any command that will list any variables also? For example "http://www.lala.com/a_folder/mypage.php?catagory=food". Is there any way to get that ENTIRE string? The command listed above would return "a_folder/mypage.php"
-
The Monkey
- Forum Contributor
- Posts: 168
- Joined: Tue Mar 09, 2004 9:05 am
- Location: Arkansas, USA
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
throw up
Code: Select all
echo '<pre>';
print_r($_SERVER);
echo '</pre>';- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I guess this is wot you are looking for.
or
or
Code: Select all
echo $_SERVER['REQUEST_URI']."<br />";Code: Select all
print_r($_GET);Code: Select all
foreach($_GET as $key => $value){
echo $key."-".$value."<br />";
}