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 [...]

[Read more →]

Tags: Programming · SQL · php

Stop Auto-bots in PHPBB. Cheap, easy BOT stopper

June 5th, 2007 · No Comments

In your active template file profile_add_body.tpl find the line:

<!– Visual Confirmation –>

ABOVE that line, add:

<!– BOT HACK –>
<tr>
<td class=”row1″><span class=”gen”>Are you a robot? *</span></td>
<td class=”row2″><select class=”post” name=”imarobot”>
<option value=”yes”>yes</option>
<option [...]

[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 [...]

[Read more →]

Tags: How Tos · Mail Post · Programming · php