Menu

#6 Bug of Encode Functions fixed

open-fixed
nobody
None
5
2008-08-24
2008-08-24
bessemm
No

In the Older version was the Encode fuctions ROT13 or base64.
Now it is possible to encode with ROT13 and base64 simultaneously.

Discussion

  • bessemm

    bessemm - 2008-08-24

    Logged In: YES
    user_id=1974376
    Originator: YES

    I Can't Upload the Fixed php File!!! Why??!
    Hier ist the source code (just replace the older code in index.php):

    //
    // DETERMINE URL-ENCODING BASED ON FLAGS
    //

    if ($_flags['rotate13'] || $_flags['base64_encode']){
    if ($_flags['rotate13'] && !($_flags['base64_encode']))
    {
    function encode_url($url)
    {
    return rawurlencode(str_rot13($url));
    }
    function decode_url($url)
    {
    return str_replace(array('&', '&'), '&', str_rot13(rawurldecode($url)));
    }
    }
    elseif (($_flags['base64_encode']) && !($_flags['rotate13']) )
    {
    function encode_url($url)
    {
    return rawurlencode(base64_encode($url));
    }
    function decode_url($url)
    {
    return str_replace(array('&', '&'), '&', base64_decode(rawurldecode($url)));
    }
    }else {
    function encode_url($url)
    {
    return rawurlencode(base64_encode(str_rot13($url)));
    }
    function decode_url($url)
    {

    $dectmp = str_replace(array('&', '&'), '&', base64_decode(rawurldecode($url)));

    return str_rot13(($dectmp));

    }

    }
    }else
    {
    function encode_url($url)
    {
    return rawurlencode($url);
    }
    function decode_url($url)
    {
    return str_replace(array('&', '&'), '&', rawurldecode($url));
    }
    }

    //
    // COMPRESS OUTPUT IF INSTRUCTED
    //

     
  • bessemm

    bessemm - 2008-08-24
    • status: open --> open-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.