How To Get Full Url Current Page In Php Function Class Snippet


How To Get Full Url Current Page In Php Function Class Snippet
  Forums Index
      » PHP Forums
        » » how to get full url current page in php function class snippet



How To Get Full Url Current Page In Php Function Class Snippet
Post Description:
Post Tags: how, to, get, full, url, current, page, in, php, function, class, snippet, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 726 Times Since Wed Mar 05, 2008 2:01 pm Posted By hostman with 1 replies
How To Get Full Url Current Page In Php Function Class Snippet
do you have a class or a function i can use to get the current web page url i am visiting

for example, this page the url is:

http://www.wallpaperama.com/forums/how-to-get-full-url-current-page-in-php-function-class-snippet-t5831.html

is there a function in php to get his? if so can you share with me

thanks

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How To Get Full Url Current Page In Php Function Class Snippet






:: 1 :: #44338 - Reply By webune On Wed Mar 05, 2008 2:05 pm
i dont know of any but i usually use this function for myself:

function WebuneFullUrl() {
$webune_s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$WebuneProtocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")) . $webune_s;
$WebunePort = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $WebuneProtocol . "://" . $_SERVER['SERVER_NAME'] . $WebunePort . $_SERVER['REQUEST_URI'];
}
echo WebuneFullUrl();
?>


just copy and save the code above into your text editor like notepad and save it as webune.php and upload to your php website and run it in your browser and you will see it in action.

hope this helps