Created
November 5, 2012 08:55
-
-
Save Riaan-ZA/4016096 to your computer and use it in GitHub Desktop.
PHP: Get full url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never trust $_SERVER data as I can set those from my user agent to be anything I want. Always escape/filter them.