Skip to content

Instantly share code, notes, and snippets.

@Riaan-ZA
Created November 5, 2012 08:55
Show Gist options
  • Save Riaan-ZA/4016096 to your computer and use it in GitHub Desktop.
Save Riaan-ZA/4016096 to your computer and use it in GitHub Desktop.
PHP: Get full url
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
@xeoncross
Copy link

Never trust $_SERVER data as I can set those from my user agent to be anything I want. Always escape/filter them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment