• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Ban IPs

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
4 posts • Page 1 of 1

Postby carlis » Thu Jul 08, 2010 6:31 pm

I am afraid the /ban command does not ban very well, because users can close and restart again the chat. It would be very good the IP ban, so the user, if he wants to enter again, must be change his IP number, which is not easy.

Any idea to ban IPs?
carlis
New member
 
Posts: 6
Joined: Thu Jul 08, 2010 6:22 pm
Top

Postby Malcomn » Fri Sep 10, 2010 3:31 pm

I have the same question. I need to ban by ip.
Last edited by Malcomn on Fri Sep 10, 2010 3:33 pm, edited 1 time in total.
Malcomn
New member
 
Posts: 3
Joined: Mon Apr 16, 2007 2:42 pm
Top

Postby re*s.t.a.r.s.*2 » Fri Sep 10, 2010 11:13 pm

There is one in the contribution section of the forum:
Click here to go
So check it out it can even ban for a specific time... regards..
Last edited by re*s.t.a.r.s.*2 on Fri Sep 10, 2010 11:14 pm, edited 1 time in total.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby waiheke » Sun Sep 12, 2010 4:39 pm

If you have MySQL access, which I do, it's easy to do two things as well. I have a simple php page, ip2.php, and the useage is ip2.php?=ip=(IP number):

$ip= str_replace(" ", "", $ip);
$db = @mysql_connect("server", "db", "password");
mysql_select_db("table",$db);
$query="SELECT * FROM ip WHERE ip='$ip'";
$resultz = mysql_query( $query, $db );
$num_rowsz = mysql_num_rows($resultz);
if (empty($num_rowsz)) {
$q1 = " INSERT INTO ip (ip) VALUES ('$ip')";
mysql_query($q1) or die("$q1 failed because ".mysql_error());
}


the index.php i use then reads the database, before anything else, and if it finds the IP number, simply exits - or redirects ..

$query="SELECT * FROM ip where ip = '$ip'";
$resultz = mysql_query( $query, $db );
$num_rowsz = mysql_num_rows($resultz);
if ($num_rowsz) {
include "oops.php";
exit;
} else {
include "query.php";
}
waiheke
Member
 
Posts: 126
Joined: Sun Sep 12, 2010 4:33 pm
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 9 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub