ok heres a handy code 2 block a browser from db that i made
function blocked_browser($str,$uid)
{
$res=mysql_query("SELECT browser FROM ibwf_blocked");
while($row=mysql_fetch_array($res)){$sites[]=$row[0];}
for($i=0;$i<count($sites);$i++)
{
if(substr_count($str,$sites[$i])>0){
echo "<card id=\"main\" title=\"Error\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"\"/>
[b]Error!!! Login Failed...[/b]
[b]This error happens usually when Using java/opera mini or another blocked browser[/b]
pls use ur mobile/pc main browser</p></card></wml>";
exit();
}
}
}
heres the sql u need to make
CREATE TABLE ibwf_blocked (
id int(11) NOT NULL auto_increment,
site varchar(255) NOT NULL default '',
browser varchar(255) NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
for this function u need to put only part of a browser name u want to block like Anonymouse will block the browser http://Anonymouse.org as its shown
also put the function under the connectdb part like this
blocked_browser($_SERVER["HTTP_USER_AGENT"],getuid_sid($sid));