Hello, Newbie here... i want to write a lot of html code into echo'' but something is going wrong, and i know there is a php function to write the exactly html code into echo, pls help THX
Use heredoc syntax <?php $html = <<<HTML <html> <head> <title>Test</title> </head> <body> Test Apa Aja Dah </body> </html> HTML; echo $html; ?> PHP:
can't make it work... I want to encrypt a WP footer with gzinflate like here http://www.kavoir.com/2009/08/one-simple-way-to-encrypt-obfuscate-hide-or-protect-your-php-code.html. But in this line echo base64_encode(gzdeflate('echo "You can\'t find me!";')); PHP: i have to change what is between double quotes with this html content <hr /> <div id="footer" role="contentinfo"> <p> <span><?php bloginfo('name'); ?> - All rights reserved</span><br/>Design by <a href="#">Designer Link</a><br/>Sponsored by <a href="#">Link1</a> | <a href="#">Link2</a> | <a href="#">Link3</a> </p> </div> </div> <?php wp_footer(); ?> </body> </html> HTML: I think is messing up becouse the php lines in the html content
<?php $code = <<<HTML <p> <span><?php bloginfo('name'); ?> - All rights reserved</span><br/>Design by <a href="#">Designer Link</a><br/>Sponsored by <a href="#">Link1</a> | <a href="#">Link2</a> | <a href="#">Link3</a> </p> HTML; echo base64_encode(gzdeflate('echo '.$code)); ?> PHP:
Hello, Still not working, This is my code <?php $code = <<<HTML <hr /> <table width="200" border="1"> <tr> <td align="left">cell 1</td> <td>cell 2</td> </tr> </table> HTML; echo base64_encode(gzdeflate('echo'.$code)); ?> <?php eval(gzinflate(base64_decode('LY1LCsAgDET3hd4h5AJ+1upd/KRVCBWC0Ou31W6G4T2GoVy7qwIq7JsbMTHB3cqoHq3WCKlLIfFocHqZWSByOy+PTMfAkIkZjFOjLLuA/cGL1NzN8h2EBw== '))); ?> PHP:
<?php $code = <<<HTML <hr /> <table width="200" border="1"> <tr> <td align="left">cell 1</td> <td>cell 2</td> </tr> </table> HTML; echo base64_encode(gzdeflate("echo '$code';")); ?> <?php eval(gzinflate(base64_decode('LY07CoAwEER7wTss26TMpzXJXfJZTWAxEAJeX402w/Aew1AqDYQtHaRfFztCZIKr5lEcGqUQYuuZukON0/eZGQLX43TItA/0iZhBWznyZz9gfvAgOXezvAdebDc='))); ?> PHP:
Try : 1. Put your html code in a file alone , call it html.php 2. add this following code above your encryption code <?php function echohtml(){ include('html.php'); } function code(){ $getcode = echohtml(); $printout = stripslashes($getcode); echo $printout; } ?> Change This echo base64_encode(gzdeflate('echo'.$code)); To This echo base64_encode(gzdeflate('code()')); Hope This Works
Still not working I get this error Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\encoding\index.php(17) : eval()'d code on line 1 Code (markup):
i can't find it <?php $code = <<<HTML <hr /> <table width="200" border="1"> <tr> <td align="left">cell 1</td> <td>cell 2</td> </tr> </table> HTML; echo base64_encode(gzdeflate('echo'.$code)); ?> <?php eval(gzinflate(base64_decode('LY1LCsAgDET3hd4h5AJ+1upd/KRVCBWC0Ou31W6G4T2GoVy7qwIq7JsbMTHB3cqoHq3WCKlLIfFocHqZWSByOy+PTMfAkIkZjFOjLLuA/cGL1NzN8h2EBw== '))); ?> PHP: Maybe if you test the code you'll understand much better Thanks Regards
I have No idea why would you do much work to encrypt a wordpress theme , try this codeproject.com/KB/security/PHPEncoder.aspx or google a free php encoder , will make it much easier for you
You do know that decoding an encrypted footer/theme is a 30 second job? It isnt worth your time doing it.... Also, if your using eval() you seriously need to look at your coding practices
yeah its easy , try it : Find an encrypted theme , openup the footer.php , where it starts <?php eval type 'start' before it and type 'end' at the very end , Now view site and view source , then find start and copy everything between start and end and place them instead of the encryption code