can anybody please full fill one more request of mine like in Mobile Chat 2.0.2 WML1.2EN (multi room) chat there is ban kill but there is no brower banning system or ip banning system with time so that if a user get that ban can not register a new account or can not login by his nick for that perticular time so that flooder can not fllood by registering a lot ids like logogo has that system if someone get banned for 1 hour that user can not login for 1 hour and also can not register another account also htportal has this system i think may be its called browser banning if anybody can help me please post it it will be really greatfull for me please . just the script that i will able to ban a person and that perticular person can not enter my chat with in 1 or 2 or 3 days please help me on that case i am in a big trouble of floooding.
I Need A Very Urgent Help And Need It Badly
Started on the old forum in October 2008 · view the original in the archive · old links redirect here
TL;DR · summary of 41 replies
- - The code approach to ban a user with their nick and IP/Browser combo is not provided in the thread as it concluded that adding such functionality would require custom coding work which was deemed too time-consuming by...
- - A simple file named blocked.php was suggested for banning users based on browser strings, but no full script or code examples were given.
- - The use of a single banned.txt file to store banned details was proposed as an alternative method, though it did not include how to save data in combo format like nokia 6630 | 123.456.789.65.
- - No solution or code for banning users based on nick and IP/Browser combination was provided in the thread.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
create a file say blocked.php and add the following
<?php if(strstr($_SERVER['HTTP_USER_AGENT'], "Opera/9.50 (Windows NT 6.0; U; en)")) { die("Following recent high abuse of the system, your access has been blocked."); } ?>obviously replacing the Opera/9.50 (Windows NT 6.0; U; en) with the device you want blocked, now just add an include on each page you want them blocked from, something like
include("blocked.php");
usually index.php and your register and login pages will suffice,
:p:p:p
brother please check it it will work or not i found as you said -
<?php $browser = explode ('/', $HTTP_USER_AGENT); $ip=file('../text/bip.txt'); $bbrower=file('../text/bbrower.txt'); if($REMOTE_ADDR=="$ip"" AND $browser[0]=="$bbrower"){ header ('Location: [http://urban-chaos.uni.cc/s60realm/chat/yo...ned.php');}](http://urban-chaos.uni.cc/s60realm/chat/yourbanned.php'%3b%29;}) ?>Does it will work for banning so that my admins and owners also can bann
how do i put a perticular time for banning as i will always not able to ban everybody my admins or other owners will ban them on this case what should i do if i want to give a perticular time
I did not write that code like that......
But like this:
<?php
$browser = explode ('/', $HTTP_USER_AGENT);
if($REMOTE_ADDR=="BANNED_IP_HERE" AND $browser[0]=="BANNED_BROWSER_HERE"){
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 (use php.net to find out more about ways of getting ip).
Make that into a file and include it on all your pages, repeating the code:
if($REMOTE_ADDR=="BANNED_IP_HERE" AND $browser[0]=="BANNED_BROWSER_HERE"){
header ('Location: [url]http://urban-chaos.uni.cc/s60realm/chat/yourbanned.php'[/url]);}
for each ban, obviously directing to your own banned page.
As for adding time, reasons etc i really can't be bothered it would mean adding a whole new function and wasting a lot of my time on a script i no longer use.
If i ever get back into the script i will do it for the next release (2.0.3)..
The code i posted above is not perfect but you can get the idea..
in thoeroy:
1. get ip
2. get browser
3. check if browser and ip match the banned browser ip
4. redirect
wappy.
ok brother can you give me any ideas for the time or any related script like it.
and one more thing is i will add that function in the tools for admins and owners
so if i add 2 files in text folder 1 is ip.txt and another 1 is brower.txt in the text folder
then i will submit the code in the pages like this just check this is correct or not :
<?php $ip=file('../text/bip.txt'); $browser=file('../text/browser.txt'); if($REMOTE_ADDR=="$ip" AND $browser[0]=="$browser"){ // here remote address and brower will get from the file in text folder ip.txt and browser.txt so that my admins and owners also can ban a ip and browser. header ('Location: [http://urban-chaos.uni.cc/s60realm/chat/yo...ned.php');}](http://urban-chaos.uni.cc/s60realm/chat/yourbanned.php'%3b%29;}) ?>is it correct
<?php
$ip=file('../text/bip.txt');
$browser=file('../text/browser.txt');
$rukiya = explode(" ",$_SERVER['HTTP_USER_AGENT']);
if($REMOTE_ADDR=="$ip" AND $rukiya[0]=="$browser"){ // here remote address and brower will get from the file in text folder ip.txt and browser.txt so that my admins and owners also can ban a ip and browser.
header ('Location: [url]http://yourdomain.com/ban.php'[/url]);}
?>
also depends up to how browser data are being saved in browser.txt
What rukiya posted is probably a better method.
As i said about the time and admin functions i have no time to do it now, i will bear it in mind for the next release of the script, sorry but i have my own work to be getting on with and don't even use the script anymore.
You could work out how to add the function by looking at the existing admin functions...
Im also wondering with this method of having two files, will it not ban ALL combinations of the browsers and ips listed? if so that is not how it should work.. it should ban only a set combo like nokia 6630 | 123.456.789.65
browser data are being saved in browser.txt will be just like the files have as the banned.txt files like if the nick is banned like a b c d inside the banned.txt if the browser.txt will be the same it will work or not
so how i suppose to save a file in a combo format like nokia 6630 | 123.456.789.65 one
how the other side do that
say is it being saved opera 9.10 or opera?
Yes there is but as i keep saying it would mean adding a whole new function to the script. I will add it in the next release (if there is one) but i have no time to do custom coding work for free.
I don't even have a working demo setup myself.
You could quite easily work it out yourself by using php.net and looking at the existing functions in the admin tools. Thanks.
there is a file named iplog.txt is there any way to ban from there with nick cz i saw there for example
::regan 202.56.7.166 Nokia6260/2.0 (3.0515.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0::
so that it will be really easy to ban him with nick
i also found this
08.04.20.17:20:06 HOSTNAME: 202.22.194.218 REMOTE_ADDR:202.22.194.218 HTTP_USER_AGENT:NokiaN70-1/5.0705.3.0.1/SN358637011701767 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1
in the kirjaus.txt file
That log file should of been removed really, we used to use it to get the ips of offending nicknames and used the first browser/ip method as i showed above.
EDIT: many phones don't allow cookies, especially the older wml based ones this script was designed for.
Also scripts like this one, ipb, send cookies on suspension, they can simply be deleted so you can register again.
QUOTE (bijaybd @ Oct 14 2008, 05:57 PM) <{POST_SNAPBACK}>
there is a file named iplog.txt is there any way to ban from there with nick cz i saw there for example
::regan 202.56.7.166 Nokia6260/2.0 (3.0515.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0::
so that it will be really easy to ban him with nick
I see you have lot of time to make topic,post to get help from others but dont have any time to learn coding. Thats really pathetic.