Jump to content

Função de url


Recommended Posts

Boas eu tenho uma função para ir buscar o URL e ela ta a ir buscar o URL original e eu não queria ,queria que ela fosse buscar aquele que manipulei.

ou seja ela devia ir buscar http://rironfire.com/vervideo-Its%20my%20life-17

e não este http://rironfire.com/videover.php?video=17


$protocolo    = (strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === false) ? 'http' : 'https';

$host		 = $_SERVER['HTTP_HOST'];

$script	   = $_SERVER['SCRIPT_NAME'];

$parametros   = $_SERVER['QUERY_STRING'];

$UrlAtual	 = $protocolo . '://' . $host . $script . '?' . $parametros;
echo $UrlAtual;

Alguém me ajuda?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.