Basic Ip Ban For Mobile Chat

Started on the old forum in September 2008 · view the original in the archive · old links redirect here

21 replies · 1,691 views · started 18 years ago · 1 min read

5 participants
Guest #1

here is a ip ban script very basic but works have fun edit as you wish

Attachments: ip_ban.php
rietrot Developer · 149 posts #2

ok im a noob give some more instruction plz

Guest #3

ok u need to get the person or person's ip address then put he ip addy in the section and u need to include the file in all the pages u wish to ban the user from so if ur ip banning i guess you wanna include it in every file

rietrot Developer · 149 posts #4

ok that wont realy work 4 me here in south africa coz most ppl on same service provider share ip`s thx m8

Guest #5

hmm ok let me see i had imie code snippet be4 ill see what i can do

rietrot Developer · 149 posts #6

thx m8 that would really help...in the mobilust forum i uploaded here that was updated i found something of a sim ban thing ill have a look and see if i can get it aswel

chris Junior · 39 posts #7

You need to ban the ip AND user agent.. this file has been in the chat since the start:

<?php
$browser = explode ('/', $HTTP_USER_AGENT);
if($REMOTE_ADDR=="ip" AND $browser[0]=="browser"){
header ('Location: [url]http://urban-chaos.uni.cc/s60realm/chat/yourbanned.php'[/url]);}
?>

You will probably need to update the browser string for php5 i just grabbed that from a very old copy of wappychat.

looony Developer · 95 posts #8

that is no better then ip banning it will ban anyone using same device and ip so u ban 1 person pro end up losing 100 possible membes there is no point ip banning there is apparently a sim id that is unique im looking into request that

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

chris Junior · 39 posts #9

its a LOT better than banning ip alone, but yes still not perfect. And no there is no way of getting sim number or imei without network co-operation. A few foriegn networks give more details than most but not many.. the best way to see what info a phone gives is by using some code maybe a little like this:

<?php
$headers = apache_request_headers();

foreach ($headers as $header => $value) {
    echo "$header: $value 
\n";
}
?>

which will output something like this:

Accept: / Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 Host: http://www.example.com Connection: Keep-Alive

looony Developer · 95 posts #10

there is always a way perhaps we could look for serial numbers

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

chris Junior · 39 posts #11

There quite simply is NOT a way, it is a huge invasion of privacy and not a feature many networks support these days.

Trust me i have read a lot about it.

looony Developer · 95 posts #12

could always request phone number on registration and send out a validation code that way u can ban the number like i said there is always away

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

chris Junior · 39 posts #13

The method of sending sms verification works yeah but there is no way to get the number/sim no/imei via php...

And at the price of sim cards now days (think you can still get them free from 02) that method is also un-effective.

Another problem is actually making sure your sms script is actually sending to all countries and networks.

Example of it being used is: http://chatabox.co.uk (use mobile).

Also you can only ban the number from registering, not actually using the site.

looony Developer · 95 posts #14

lol just an idea i personally have fun tring to keep ppl out of my site when there being a pain its fun lol ps. who are you pss. ill bbs

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

chris Junior · 39 posts #15

Another way is shielding trusted users like in the lava script, so if they have a shield the ip/browser ban is ignored, but its a slow process of shielding each trusted user, maybe if it was set to auto-shield after a set time period of being a member, mmm.

metulj Super moderator Principal · 1,726 posts #16

Another way is shielding trusted users like in the lava script, so if they have a shield the ip/browser ban is ignored, but its a slow process of shielding each trusted user, maybe if it was set to auto-shield after a set time period of being a member, mmm.

i simply set auto shield ON when user get validated 😉 it is that simple 😀

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

looony Developer · 95 posts #17

no cause it stop any other user from sign up if they have same ip

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

chris Junior · 39 posts #18

i simply set auto shield ON when user get validated 😉 it is that simple :D

Surely that defeats the whole point if ALL validated members are shielded. ???

metulj Super moderator Principal · 1,726 posts #19

Surely that defeats the whole point if ALL validated members are shielded. ???

its the only way you can use IP ban..

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

looony Developer · 95 posts #20

that wont change a thing still bans new ppl with same ip so it dont solve anything

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

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