How To Get Full Url Current Page In Php Function Class Snippet
- Forums
- PHP
- How To Get Full Url Current Page In Php Function Class Snippet
how to get full url current page in php function class snippet [1123], Last Updated: Sat May 18, 2024
wallpaperama
Wed Mar 05, 2008
1 Comments
1809 Visits
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
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
https://www.wallpaperama.com/forums/how-to-get-full-url-current-page-in-php-function-class-snippet-t5831.html