Redirect Banned Ip/browsers

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

8 replies · 1,294 views · started 20 years ago · 1 min read

2 participants
stringfellowhawk #1

who have the coding for redirect banned ips/browser to a another place

hardstyle Developer · 154 posts #2

add this in ipban.php

<?php

// IP AND BROWSER BAN

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

// BROWSER BAN

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

?>

8th wonder of the world

GumSlone Administrator Principal · 1,690 posts #3

Here is a simple code

$IP_BROWSER="$REMOTE_ADDR$HTTP_USER_AGENT";  //IP/BROWSER
$Banned1="12.31.432.34Nokia_bla_bla_bla";
$Banned2="190.34.23.45Samsung_i_dont_like_this_phones";
if ($IP_BROWSER==$Banned1||
$IP_BROWSER==$Banned2)
header("Location: http://2wap.org/forums/index.php");

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

mobix #6

They both not good, becouse GPRS providers IP is same for all users and if you ban that ip with mobile model all with this same info will be banned, many unwanted to External image (may be gone)

GumSlone Administrator Principal · 1,690 posts #7

They both not good, becouse GPRS providers IP is same for all users and if you ban that ip with mobile model all with this same info will be banned, many unwanted to External image (may be gone)

Not every user has the same phone software installed even if they have same phone models

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

GumSlone Administrator Principal · 1,690 posts #9

Too big risk External image (may be gone) to ban someone else what not needed to be :/ Best was that if we could ban be IMEI or SIM card info External image (may be gone) but that is inposible

But if someone is causing to much troubles on your site you have to use this bann even ifit would ban others, but the most members are safe External image (may be gone)

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

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