Archive for the ‘PHP’ Category

Encrypted Wordpress Themes

Saturday, January 10th, 2009

I was checking out a Wordpress template for a client who wanted to use it for one of their sites. When I came to the footer.php file, I noticed that the entire file consisted of a block of text in the following format:

eval(gzinflate(str_rot13(base64_decode('FZrHEo...'))));

I suppose that template authors do this to protect the footer ‘Designed by’ references to their own site, which is fair enough. However, as would generally be the case, I wanted to see the unencrypted PHP code to ensure that nothing malicious was happening within it. Also, in this case, a significant portion of design code was contained within this encrypted code, and I wanted to modify the design a bit.

Decryption code for this type of stuff is common, and a google search will give you ample results.

One great online decoder I found is here: http://josh.thespiffylife.com/decrypt.php

Sending PHP email via external SMTP server

Monday, October 13th, 2008

I recently installed a WAMP (Windows, Apache, MySQL and PHP) setup on my copy of Windows Vista and set up an installation of Bamboo Invoice. I created an invoice to send to a client but then realised there was no PHP mail configuration. I couldn’t be bothered (and am not very expert) setting up a mail server on my computer, but it occurred to me that I could just reference the SMTP server provided by my ISP that I use for my usual email sending.

(more…)

external, dynamic, PHP-generated javascript

Friday, September 5th, 2008

I was recently working on a project which required me to insert external, dynamically generated, HTML code into a HTML page. The dynamic HTML code was being generated with PHP, as it was extracting data from a MySQL database for display. So people would be able to paste some static code into their page and this code would reference an external file on a remote server which would return content.

(more…)