Lavalair Browser Block

Started on the old forum in August 2007 · view the original in the archive · old links redirect here

5 replies · 1,264 views · started 19 years ago · 1 min read

linkrx7 #1

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));

Guest #2

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=\"\"/>

Error!!! Login Failed...


This error happens usually when Using java/opera mini or another blocked browser


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));

u havent made the codeing intructions that easy after the code is put iin core whatnext really be more specific

linkrx7 #3

i said u gota put the blocked_browser($_SERVER["HTTP_USER_AGENT"],getuid_sid($sid)); under the connectdb function in ur script pages

Guest #5

don't u think thats too complicated? a simple flat base script would be more handy! i made one for a friend's site.

Guest #6

Yea u wont need to add all the names of sites that gives anonymous browsing.. if u just block http:// dat wud block most of the sites...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close