martes, 29 de marzo de 2016

Get the full URL in PHP

Have a look at $_SERVER['REQUEST_URI'], i.e.
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
(Note that the double quoted string syntax is perfectly correct)
Editor's note: using this code has security implications. The client can set HTTP_HOST to any arbitrary value it wants.
http://stackoverflow.com/questions/6768793/get-the-full-url-in-php

No hay comentarios:

Publicar un comentario