I want to encode my urls in base64 and decode it in my functions and no body can decode it how can i do this.
<?php
$somestring = 'here is my some string';
$url = 'http://google.com/'.$somestring;
base64_encode($url);
?>
I want to encode my urls in base64 and decode it in my functions and no body can decode it how can i do this.
<?php
$somestring = 'here is my some string';
$url = 'http://google.com/'.$somestring;
base64_encode($url);
?>
Base64 is not meant for encrypting sensible data. It's merely a means of representing data in another way. What it does, it takes binary data and converts it to ASCII, so that binary data can be represented with ASCII characters.
If you want to encrypt strings like your URLs, you have to choose an encryption algorithm like Blowfish, which is available in the PHP bcrypt extension.