Anti SQL Injection Script

virus

New Member
i get this script

PHP:
<?php

if(!get_magic_quotes_gpc()){
  $_GET = array_map('mysql_real_escape_string', $_GET);
  $_POST = array_map('mysql_real_escape_string', $_POST);
  $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}else{ 
   $_GET = array_map('stripslashes', $_GET);
   $_POST = array_map('stripslashes', $_POST);
   $_COOKIE = array_map('stripslashes', $_COOKIE);
   $_GET = array_map('mysql_real_escape_string', $_GET);
   $_POST = array_map('mysql_real_escape_string', $_POST);
   $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}

   ?>

this scrip put before action get data $post,$get,$cookie this will be filter all data will be come in pst cokies and get

the problem i don't know where must i put this script..what file name in vbulletin file ? any one can explain coz this good for blocking sql injection from hackers
 

virus

New Member
this i try but i get eror in header...can anyone help about this coz this realy good to filtering fron sql injection or nayone have more tutorial to safety from injection
 

bluescorpion

New Member
The code you have posted only matters on forms and would only be useful for validating user input, for example the registration form or perhaps the contact form. If you have a forms that your members needed to fill in, this check might be useful for that as well.
 
Top