Search Keyword:

Posts Tagged ‘show current url

19Jun

display current url function - PHP

Posted by admin as PHP

Here is a function that displays current url using php:

function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
echo curPageURL();


Sponsored Links


Categories





Recent Comments

  • admin: Hello Josh, Personally, my PSP is a PSP 3002 with OFW 5.03. Follow the steps and you will be fine. If ever...
  • josh: ok im a 100% noob and i have just brought myself a psp 3002 with ofw 5.03 ive been researching alot about...
  • admin: You cannot downgrade it to 5.03. Unfortunately, you have to wait for the new hack for versions above 5.03,...
  • kev: Hello, what can i do if my psp version is higher than 5.03 ? How do i downgrade it ?
  • admin: Thanks Silver for your solution and suggestion! Very much appreciated. Thanks!