Brain Goo

Carpe Crap ‘em

Brain Goo header image 4

Entries Tagged as 'php'

Quick Character Escaping in PHP

October 10th, 2007 · No Comments

When writing PHP web apps, I tend to run in to a portability issue when dealing with SQL connectivity. Since I can’t count on having the PEAR DB module available, I rolled my own set of functions to interact with a MySQL database. The problem lies in escaping characters in your SQL queries. Do I [...]

[Read more →]

Tags: Programming · SQL · php

Stop spam-bots in PHPBB 2.x. Cheap, easy BOT stopper

June 5th, 2007 · No Comments

WARNING!  As of this writing, this information pertains to the 2.x branch of phpBB.  I strongly recommend you upgrade to the latest phpBB.  As of April 28, 2009 that version is 3.0.4.  Please see http://phpbb.com NOTICE: I have an updated phpBB patch for the 3.0.x version of phpBB.  Please search this blog for phpBB or [...]

[Read more →]

Tags: How Tos · php · phpbb · spam

PHP Header injection

May 21st, 2007 · No Comments

I regularly shut down web sites that use the PHP mail() function. While the users of the sites mean well, they generally don’t do any checking before sending data to mail(). I’m not going to weigh in mail(). Enough has been said about it. Just remember to take your code and code security seriously. Remember, [...]

[Read more →]

Tags: How Tos · Mail Post · Programming · php