1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Very Need Base 64 PHP encoder

Discussion in 'PHP' started by angeal, Jun 26, 2010.

  1. #1
    Hey there :)

    i want php script that can encode php scripts with base 64 methode encryption....

    with 2 form.. 1 for input souce code.. and 1 for the output..

    please share it... :(
     
    angeal, Jun 26, 2010 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    digitalpoint, Jun 26, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    This should start you off:

    <form method="post">
    Input:<br />
    <textarea name="input" style="width: 400px; height: 300px;"></textarea><br />
    <input type="submit" name="submit" value="Encode">
    </form>
    <?php
    if (isset($_POST['submit'])) {
    //strip php tags to avoid eval parsing issue..
    $input = str_replace(array("<?php", "<?", "?>"), "", $_POST['input']);
    ?>
    Output:<br />
    <textarea style="width: 400px; height: 300px;">&lt;?php eval(base64_decode("<?php echo base64_encode($input); ?>")); ?></textarea>
    <?php
    }
    ?>
    PHP:
     
    Last edited: Jun 26, 2010
    danx10, Jun 26, 2010 IP
  4. angeal

    angeal Guest

    Messages:
    237
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #4
    @danx..

    thanks for the code dude :)

    @Mr digitalpoint

    what is difference between encoding and encryption??
     
    Last edited: Jun 26, 2010
    angeal, Jun 26, 2010 IP
  5. Gray Fox

    Gray Fox Well-Known Member

    Messages:
    196
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #5
    The main difference is that encryption uses a secret key to encrypt/decrypt content.
     
    Gray Fox, Jun 26, 2010 IP
  6. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    #6
    you can well create an encryption by modifying base64. pretty nice way to pass along url parameters to cloaker scripts etc. and not having people tamper with your urls.
     
    happpy, Jun 26, 2010 IP
  7. JR Davis

    JR Davis Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    great script, thanks for sharing.
     
    JR Davis, Jun 26, 2010 IP
  8. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #8
    Yeah a tip is to combine with MD5 or SHA1
     
    roopajyothi, Jun 26, 2010 IP
  9. antiseptic

    antiseptic Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    you should use zend or ioncube for encyription

    ioncube has a online encoder. you buy credits via paypal then you can encyription
     
    antiseptic, Jun 28, 2010 IP
  10. solutions.50webs.com

    solutions.50webs.com Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    $img1 = 'bYw/pq7nN/9QXTJVxi/75V/o6X/AKpe1QSX97p/6/Ff1mzq1+rdVfSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpXDDgf+Mp1g/wBOLV9/1k8n1cZT++Uv6OiP6pZVQRv97qf6/K/1m8rqybv/AAeh/wDY03/yQVbqr6//2Q==';
    header( "Content-Type: image/jpg" );
    echo( base64_decode( $img1 ) );

    I have the file with above code, how do i decode it? which tools are helpful for it?
     
    solutions.50webs.com, Jul 31, 2010 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    You are already decoding it in that PHP code... it's an image stored within the PHP file. base64_decode() is what decodes it.
     
    digitalpoint, Jul 31, 2010 IP
  12. solutions.50webs.com

    solutions.50webs.com Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Expecting it in english language.
     
    solutions.50webs.com, Jul 31, 2010 IP
  13. bigmax

    bigmax Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    My oh my what manners...
     
    bigmax, Aug 1, 2010 IP
  14. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #14
    Basically its an image, why would you need to decode an image? - no harmful code behind it.
     
    danx10, Aug 1, 2010 IP