PX : code

Translate characters to web safe codes by Marcus
Download this code


<?php

if(isset($_GET['mode'])) {

        
$mode=urlencode($_GET['mode']);
        
$val=$_GET['val'];

        switch(
$mode) {

                case 
"base64_encode": echo base64_encode($val); break;
                case 
"base64_decode": echo base64_decode($val); break;
                case 
"urldecode": echo urldecode($val); break;
                case 
"urlencode": echo urlencode($val); break;
                case 
"htmlentities": echo htmlentities($val); break;
                case 
"rot13": echo str_rot13($val);break;
                case 
"md5": echo md5($val);break;
                case 
"sha1": echo sha1($val);break;
                case 
"all":
                        echo 
"base64_encode: ".base64_encode($val)."<br/>";
                        echo 
"base64_decode: ".base64_decode($val);
                        echo 
"<br/>";
                        echo 
"urldecode: ".urldecode($val);
                        echo 
"<br/>";
                        echo 
"urlencode: ".urlencode($val)."<br/>";
                        echo 
"htmlentities: ".htmlentities($val)."<br/>";
                        echo 
"addslashes: ".addslashes($val)."<br/>";
                        echo 
"rot13: ".str_rot13($val)."<br/>";
                        echo 
"md5: ".md5($val)."<br/>";
                        echo 
"sha1: ".sha1($val)."<br/>";
                break;
        }

exit(
0);

}


?>

REST OF HTML

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.