WordPress capturing $_POST requests (updated script)

A while ago, I discovered a small and useful code snippet, which allowed you to capture all $_POST activity, related to your WordPress blog.

This might be useful when your WP-based website is experiencing a hacker attack. Or when you want to know where from is coming the biggest spam comment flood that try to drown your MySQL database in spam.

After using this small code snippet for a while, I discovered a way to improve it a little bit.

The original script didn’t show timestamps of the events recorded. I added this functionality, while leaving the original code almost the same.

If you want to use this updated version, feel free to copy the code:

$posty_ip = $_SERVER['REMOTE_ADDR'];
$the_file = $_SERVER['SCRIPT_NAME'];
$date_sub = date('Y-M-d @ H:i (O)');
if ( $posty_ip != "123.123.123.12" && $posty_ip != "123.123.123.23" ) {
  if ( !empty($_POST) ) {
    $fp = fopen( '/home/path/path-to-log.html', 'a' );
    foreach( $_POST as $key => $value ) {
	fwrite( $fp, $key.' = '.$value." 
\n" ); } fwrite( $fp, "ip = ".$posty_ip."
\n" ); fwrite( $fp, "date = ".$date_sub."
\n" ); fwrite( $fp, "file = ".$the_file."
\n" ); fwrite( $fp, '================================================'."

\n\n" ); fclose( $fp ); } }

I also added HTML line breaks, as for me it was more useful to have an HTML log file.

The instructions where (and how) to place this code can be found in the original place. Still, it’s worth repeating: Be careful where you place the log file on your server!

I would also recommend to use a plugin, which encrypts passwords (you can download it from wordpress.org). This is not obligatory, but it is always wise to send passwords over http encrypted, and this plugin does exactly that (you don’t have to use https to be able to encrypt the passwords being sent).

Enjoy! :-)

Courage the cowardly dog

Courage the cowardly dogWhen I first saw Courage, the fearless cowardly dog, I was much impressed by the animation and the originality of the mini-series.

I think that since Tom and Jerry there were not invented better cartoons than Courage! :-)

Here I will show you one of the series, chosen at random:

[Flash player with embedded Video/Audio]

…and not only because Courage the cowardly dog is a funny dog, but also to make a proof that you can obtain a much better audio/video quailty, encoding your movies yourself, compared to the crappy quaility of YouTube:)))

Enjoy the movie! :)

PS And don’t forget to search for all the other Courage series — your invested time will be worth it! ;-)

Lanson Black Label… and the Rila Lakes

If someone ever says to you, that he is able to climb on an altitude of 2.5 km, bringing with him real French champagne and crystal glasses from Bohemia…

The Rila Lakes

Lanson Black Label champagne and the Rila Lakes

Lanson Black Label and two glasses

…you may at least try to believe him! ;-)

(2006, October 1st and 2nd, two weary travellers are celebrating high up in the mountains with Lanson Black Label French champagne; there are no other two adventurers like the two of us!:-) I’d like again to be able to do such crazy thing with Ani. These photos have been in out digital photo archive for 3 years or so… It’s maybe the inappropriate time to bring them up… but maybe it’s just the right time!…)

Michael Jackson – Concerts in London, 2009!

Michael Jackson posterMichael Jackson, the legend, the King of Pop, the unforgettable, the unique…

Michael Jackson will have a series of conerts in London in July 2009!

I’ve got the news from BBC’s website: news.bbc.co.uk/2/hi/entertainment/7925388.stm, but you can also read about it on CNN.com, as well.

Tickets will be available on:

www.michaeljacksonlive.com

The prices for the tickets will be quite decent — £75/ £65/ £50, you just have to grab two tickets and then book your airline tickets, too (unless you are lucky and live in London, of course;-) Btw, tickets will be available after March 13th.

Michael Jackson

I don’t think there was, or ever will be a person in this world that can dance like Michael Jackson…

(I might be wrong, of course…)

Unfortunately, I’ll have to postpone my dreams of seeing Michael Jackson live in London this summer (because of financial reasons)…

But I always liked him. Not his songs so much, but his dance, because it is truly unique as style. No matter how many imitators there will be in this world, they’ll remain simply imitators, because he is The One… The person, who invented the Moon Walk… The person, who has sold millions of copies of the ‘Thriller’ album…

…And the rest, as they say it, is simply History! ;-)

Maybe This Is The Biggest Logo Of Firefox In This World

A while ago, searching for a copy of the Firefox logo in some large format, I found an interesting website, which title ran like this:

Maybe This Is The Biggest Logo Of Firefox In This World

On this site there was nothing else, except one extremely big logo of the Firefox browser, in PNG format, 4500×4330 pixels in size! :-)

In a similar way, the domain name was very long and descriptive, too: http://www.maybethisisthebiggestlogooffirefoxintheworld.cn.

Unfortunately, now the URL gives an error (Bad Request [Invalid Hostname]), and I am not sure if there’s preserved somewhere online a copy of this logo, so I decided to publish mine, which I luckily saved locally on my computer at the time I first found the website.

Maybe This Is The Biggest Logo Of Firefox In This World (downsized version)

Download Firefox Logo (4500px x 4330px, PNG 32 bit, alpha transparent ]

The logo is not in vector format (the original was made in Macromedia Fireworks by British designer John Hicks), but anyway, ~ 4000×4000 pixels is quite a big size, and I think that this variant can be printed without a problem even on a big balloon or a gigantic billboard… ;-)

It’s also interesting to note, how time’s flying — the logo of Firefox is 5 years old, already (the Firefox browser is a bit older), and I feel as if it was yesterday, when we were all downloading a copy of Firefox 0.8 Beta, and Firefox started slowly to replace the Mozilla Suite 1.xx… :-)

//Sidenote: Firefox is under GPL, and I guess, its logo is also covered by this free license;-)

UPDATE/DISCLAIMER (2009/Mar/01@23:30): This logo of Firefox is a registered trademark of the Mozilla Foundation, and is not used for any commercial purposes whatsoever. It is an exact copy of the Firefox logo, downloaded from this website.