Hello, I would like to know how I can use JavaScript or PHP to put this url https://protetor.com/?url=
before the addresses of download servers automatically I use these servers SkyDrive, Clouddrive, Pcloud, Bitcasa, Meocloud, LolaBits, Google, Clouddriver I used the Adfly it has a script in JavaScript that automatically adds the address at the beginning of these URLs to the address of the protector. With all this new protector they 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 is there any way in PHP to encode the url? in the end ? in base 64
EXAMPLE:
https://protetor.com/?url=aHR0cHM6Ly91cGxvYWRici5jb20vOTBmZTExODRmZTkxNzBhNA==
To decode I already know, but not to code ... Does anyone know how?