Monk3h Posted May 18, 2008 Share Posted May 18, 2008 There is some one causing allot of problems for me on my PHP game. I have used in game means to punish him and he simply deleted and remakes an account, all security measures in place don’t stop this as he uses a proxy server. How would I block his ISP? As far as Im aware that would stop the problem until he got on at another computer. I have no ways or tracking his ISP tho, only his IP so far. Please can some one help ASAP as hes ruining my game for everyone!! Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/ Share on other sites More sharing options...
Orio Posted May 18, 2008 Share Posted May 18, 2008 The main function you're looking for is gethostbyaddr(). Orio. Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544212 Share on other sites More sharing options...
Monk3h Posted May 18, 2008 Author Share Posted May 18, 2008 I tested it out on an admin and it returned there IP adress. <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo $hostname; ?> Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544220 Share on other sites More sharing options...
MadTechie Posted May 18, 2008 Share Posted May 18, 2008 Blocking his IP, is very basic, blocking a range can hurt others.. when you check his ip, also check X-Forwarded-For as simple proxies use that for the client IP you can detect some proxies, and ban his ISP range, but i think a better solution would be to have the members signup (create an account) these account need to be activated (activation link sent to via email), while this won't stop him from setting up new email accounts it does slow them down, 10 minutes to create an account less than a minute to remove him can you PM his IP to me, i'll see if i can get the rang (don't post it publically, i don't think thats fair) Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544222 Share on other sites More sharing options...
MadTechie Posted May 18, 2008 Share Posted May 18, 2008 Humm, i think we skipped an issule here.. what type of problems is he causing, the last online game i created (some years ago), i offered an award for anyone who could find a cheat/exploit for the game, one person found a way of getting inf. money, my logs showed me what he was doing and i plugged the hole and removed the money he gained, he later told me a simple trick he found, which i plug and awarded him for letting me know. maybe pluging the problem would be better than removing him (well better still both) Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544233 Share on other sites More sharing options...
Monk3h Posted May 18, 2008 Author Share Posted May 18, 2008 He just being a total **** and spamming everyone. Just generaly causing hastle to other players and making the game less fun for everyone. Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544235 Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 yes if you bloack his ip he could be on a network therfore blocking more....plus he can change his ip if he wants... i would deff do as mad says... that way you can control the situation... Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544237 Share on other sites More sharing options...
Monk3h Posted May 18, 2008 Author Share Posted May 18, 2008 I have it set up so that people ISP's are recorded in the database on every page they visit. Im going to create a bad ISP list for everyone who i want to block. Whats the string for selecting an entire table and its enteries? then id simply do if ($isp == $badisptable){ Print "Go home!"; } Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544238 Share on other sites More sharing options...
Monk3h Posted May 18, 2008 Author Share Posted May 18, 2008 Can anyone see whats wrong with this? It returns an error.. if ($view == isp) { print "<form method=post action=admin.php?view=isp&step=isp>ID: <input type=text name=id> <input type=submit value=BLOCK ISP></form>"; if ($step == isp) { $user = mysql_fetch_array(mysql_query("select * from players where id='$id'")); $isp = $user[isp] $sql = "INSERT INTO badisp ( id, isp ) "; $sql .= "VALUES ('".$id."', '".$isp."' )"; $sql .= ""; mysql_query("$sql"); print "You have blocked Player <b>$id 's</b> ISP<br><br>ISP: <b>$isp</b>"; } } Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544259 Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 here you go <? if ($view == isp) { print "<form method=post action=admin.php?view=isp&step=isp>ID: <input type=text name=id> <input type=submit value=BLOCK ISP></form>"; if ($step == isp) { $user = mysql_fetch_array(mysql_query("select * from players where id='$id'")); $isp = $user[isp]; $sql = "INSERT INTO badisp ( id, isp ) "; $sql .= "VALUES ('".$id."', '".$isp."' )"; $sql .= ""; mysql_query("$sql"); print "You have blocked Player <b>$id 's</b> ISP<br><br>ISP: <b>$isp</b>"; } }?> $isp = $user[isp]; = missing ; Quote Link to comment https://forums.phpfreaks.com/topic/106173-isp-banning-in-php/#findComment-544264 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.