Dont Ban Myself

Started on the old forum in July 2006 · view the original in the archive · old links redirect here

17 replies · 1,574 views · started 20 years ago · 1 min read

2 participants
hardstyle Developer · 154 posts #1

ok lets say i use opera, and sum1 else also uses opera

now in my chat i got incldue ipban.php everywhere

and then this code

$browser = explode ('/', $HTTP_USER_AGENT);
if($browser[0]=="Opera"){
header ('Location: yourbanned.php');}

how do i stop myself from being browser banned if only want to browser sum1 else excpet me ?

8th wonder of the world

naveen-PHP LEARNER #2

hmmm....a round case... maybe u should add..External image (may be gone)

<?
$yourip="";
$browser = explode ('/', $HTTP_USER_AGENT);
$ip=$REMOTE_ADDR;
if($browser[0]=="Opera"&&$ip!==$yourip){
header ('Location: yourbanned.php');}
?>

Maybe this will help you. But its not safe at all !! cuz if someone else has the MATCHING ip of urs, he can not b banned. External image (may be gone) External image (may be gone) So we'hav to try some thing else , with passwords. External image (may be gone)

matthew #3

what do u mean

hardstyle Developer · 154 posts #4

naveen maybe something like

if $nini = "djdance"..... etc ?

oh but i dont want to ipban, only browser ban

8th wonder of the world

hardstyle Developer · 154 posts #6

ok but whats the code ???

then i can make it even more powerfull by adding ip and browser ban, and like a shield for users then with same browsers and ip

i know how to ban ip and browser but then i ban everyone using the same, thats why i want to exclude users with the same details

8th wonder of the world

hardstyle Developer · 154 posts #8

its flatfile script, it get saved it nims.txt

8th wonder of the world

naveen-PHP LEARNER #9

Is $nini an username variable?

hardstyle Developer · 154 posts #10

nimi = nickname... it just other language

8th wonder of the world

wapkralj Developer · 237 posts #11

you mean mobiilichat script,bro just add like this IN TOP you can change $your_browser and $browser2 to $browser if want to ban all Opera $browser = explode ('/', $HTTP_USER_AGENT); $browser2 =$HTTP_USER_AGENT; $ip ="127.0.0.1"; $your_browser = "Opera/8.51 (Windows NT 5.1; U; en)"; if ($REMOTE_ADDR =="$ip" AND $browser2 =="$your_browser" AND $nick !="wapkralj"){ echo "<wml>"; echo "<card title="ban" ontimer="http://wapforum.org.uk">"; //send him here to we handle him External image (may be gone) echo "<timer value="10"/>"; echo "

"; echo "Ban hahhaha"; echo " "; echo "</card>"; echo "</wml>"; exit(); }

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