-1
Ola would like to know how I can use Javascript or PHP to put this url https://protetor.com/?url=
before the addresses of the download servers automatically I use these servers Skydrive, Clouddrive, Pcloud, Bitcasa, Meocloud, Lolabits, Google, Clouddriver I used Adfly it has a Javascript script that automatically adds the address at the beginning of these Urls to the address of the protector. With all this new protector do not have this kind of scripts.
AN EXAMPLE IN jQuery:
// Lista de bases de URLs dos servidores.
var urlsBases = ["meocloud.pt", "mega.co.nz", "outro.servidor.com"];
for (var i = 0; i < urlsBases.length; i++) {
var serverUrlBase = urlsBases[i];
// OBS: é necessário colocar entre aspas simples a url no filtro do jQuery
por atributo.
$("a[href*='" + serverUrlBase + "']").each(function() {
var urlProtegida = "https://protetor.com/?url=" +
$(this).attr("href");
$(this).attr("href", urlProtegida);
});
}
But there is some form in PHP to encode the ? url at the end ? in base 64
EXAMPLE:
https://protetor.com/?url=aHR0cHM6Ly91cGxvYWRici5jb20vOTBmZTExODRmZTkxNzBhNA==
To decode I already know, but not to encode... Someone knows as ?
In php, you can make it pick up the url automatically as in javascript ?
– Matheus Vitor
@Matheusvitor It is not possible to manipulate HTML with PHP. It is possible to manipulate if these URL come from a database. There it is possible to manipulate before, but before HTML is loaded.
– Valdeir Psr
Thank you helped!
– Matheus Vitor