How To Get Full Url From Address Bar

RegisterLogin
How To Get Full Url From Address Bar
Post Description: Want To Know How To Get The Full Url From The Address Bar Using Php So I Can Use It On My Php Code
Tags: How, To, Get, Full, Url, From, Address, Bar
This Post Was Posted On Oct 26, 2009 By Huilom #2642
thanks for your previous help on other posts. but now i have a challenge that i have not been able to resolve. i am writing a php script and i am required to get the full url from the current page. and not the domain only like using the hostname, but rather the whole url. can you help me get complete url in php? if i can get the get full path using php that would be very helpful. i know its probably easy like getting it from the server path or using javascript, but i want to use php because the script i am using i have to use a string. anyways, thanks in advance. i looked everywhere in php.net to see if a function exists that i can use to grab the url from the browsers address bar, so if you know of any function or class, let me know
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
psyche
#4763 1
$url = $_server['http_host'].$_server['request_uri'];
echo $url;

this will give you: domain/index.php?page=foo&mode=bar

if is used, this is ofc added to the variable.

/p
Jan 17, 2011 Reply Report abuse
webune
#2664 2
i dont know of any php function that php comes with that can do that. but let me research

meawhile, if anyone has a custom function please post it here. i had one, so ill look for it
Oct 26, 2009 Reply Report abuse
©2012 Webune Forums - Thu Dec 13, 2012 10:40 am
Powered by: Webune Forums V3