PHP expert |
|
//
// DETERMINE URL-ENCODING BASED ON FLAGS
//
if ($_flags['rotate13'])
{
function encode_url($url)
{
return rawurlencode(str_rot13($url));
}
function decode_url($url)
{
return str_replace(array('&', '&'), '&', str_rot13(rawurldecode($url)));
}
}
else if ($_flags['base64_encode'])
{
function encode_url($url)
{
return rawurlencode(base64_encode($url)); // dit dus.
}
function decode_url($url)
{
return str_replace(array('&', '&'), '&', base64_decode(rawurldecode($url)));
}
}
else
{
function encode_url($url)
{
return rawurlencode($url);
}
function decode_url($url)
{
return str_replace(array('&', '&'), '&', rawurldecode($url));
}
}
// // DETERMINE URL-ENCODING BASED ON FLAGS // if ($_flags['rotate13']) { function encode_url($url) { } function decode_url($url) { } } else if ($_flags['base64_encode']) { function encode_url($url) { } function decode_url($url) { } } else { function encode_url($url) { } function decode_url($url) { } }
|