1
37

urlencrypt

  1. require_once 'aesencrypt.php';
urlencodebase64
SYNOPSIS

urlencodebase64($s)

DESCRIPTION
CODE
  1. function urlencodebase64($s) {
  2.     return str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode($s));
  3. }
urldecodebase64
SYNOPSIS

urldecodebase64($s)

DESCRIPTION
CODE
  1. function urldecodebase64($s) {
  2.     $s64 = str_replace(array('-', '_' ),array('+', '/'), $s);
  3.  
  4.     $mod4 = strlen($s64) % 4;
  5.     if ($mod4) {
  6.         $s64 .= substr('====', $mod4);
  7.     }
  8.  
  9.     return base64_decode($s64);
  10. }
urlencrypt
SYNOPSIS

urlencrypt($s, $key)

DESCRIPTION
CODE
  1. function urlencrypt($s, $key) {
  2.     return urlencodebase64(aesencrypt($s, $key));
  3. }
urldecrypt
SYNOPSIS

urldecrypt($s, $key)

DESCRIPTION
CODE
  1. function urldecrypt($s64, $key) {
  2.     return rtrim(aesdecrypt(urldecodebase64($s64), $key));
  3. }
SEE ALSO

aesencrypt

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].