Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $matheus = new Matheus;
- class Matheus{
- private $hash = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
- private $key = "3MX1UWemkf8NBVwhiR60PxY4vnQOHbpSuJraGcgL9lF2otqK7dT5jsAZCDyIzE";
- function Encode($url)
- {
- $url = trim($url);
- $url = strtr(base64_encode($url), $this->key, $this->hash);
- return $url;
- }
- function Decode($url)
- {
- $url = trim($url);
- $url = base64_decode(strtr($url, $this->hash, $this->key));
- return $url;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement