/ Published in: PHP

Based on http://snipplr.com/view/2734/get-full-url/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? function full_url() { $protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")) . $s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); $address = $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; return $parseUrl['scheme'].'://'.$parseUrl['host'].$parseUrl['port'].$parseUrl['path']; } ?>
Comments
