Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 22:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Upcoming IP-ban PHP script

Discussion on Upcoming IP-ban PHP script within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old 09/01/2009, 23:53   #16
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
ipban script for your website is easy, here's a bit code

PHP Code:
<?
echo '<table align="center" class="content" cellspacing="0" cellpadding="0">
<tr>
<td>'
;
if (
$_GET['do'] == "add"){
if (
$_POST['ip'] == ""){
echo 
'<center><strong>Please set an IP.</strong></center>';
} else {
$ip $_POST['ip'];
$query mssql_query("SELECT * FROM site_ipban WHERE ip = '".$ip."'");
while(
$r mssql_fetch_array($query)){
$excist 1;
}
if (
$excist == 1){
echo 
'<center><strong>The IP is already banned.</strong></center>';
} else {
mssql_query("INSERT INTO site_ipban (ip) VALUES ('".$ip."')");
echo 
'<center><strong>The IP is banned.</strong></center>';
}
}
}
if (
$_GET['do'] == "remove"){
mssql_query("DELETE FROM site_ipban WHERE id = '".$_GET['id']."'");
echo 
'<center><strong>The IP is deleted.</strong></center>';
}
echo 
'<table align="center" width="150">
<tr><td width="100"><strong>IP:</strong></td><td></td></tr>'
;
$query mssql_query("SELECT * FROM site_ipban");
while(
$r mssql_fetch_array($query)){
echo 
'<tr><td>'.$r['ip'].'</td><td><a href="?site=ipban&do=remove&id='.$r['id'].'">Remove</a></td></tr>';
}
echo 
'</table>
<center><form method="post" action="?site=ipban&do=add">'
;
echo 
'<br />IP: <input type="text" name="ip" /><br />
<input type="submit" value="Add" /></form></center>
</td>
</tr>
</table><br />'
;
?>

PHP Code:
<?
include("iplist.php"); 
if(
in_array($_SERVER['REMOTE_ADDR'], $ip)) {
exit(
"You are banned from this site."); 

?>
janvier123 is offline  
Old 09/02/2009, 19:17   #17
 
elite*gold: 0
Join Date: May 2008
Posts: 238
Received Thanks: 8
go ahead it will be amazing ...
lelothebest is offline  
Old 09/02/2009, 19:25   #18
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,451
Received Thanks: 840
I still have to download the SQL itself, SP4, all databases, restore it, test it and make it ****** friendly, if you know what I mean...
PHP Code:
mysql_connect("localhost""root""exapmple123") or die(mysql_error()); // your IP, account and password
mysql_select_db("server") or die(mysql_error()); //your database's name 

And my method adds the IP to the user_account table when a user registers, however I didn't get a regpage to work yet, it just reloads itself... So yeah, a lot of work before I can release it.
Zombe is offline  
Reply


Similar Threads Similar Threads
[New] UpComing LvL TooL
01/11/2010 - WarRock - 8 Replies
Hey Epvper´s, wie ja sicher jeder mitbekommen hat gibt es haufen Player die A]way F]rom K]eyboard gehen, meistens auftauchend durch -Ingame Jumps -AutoReady wird nach 30 Sekunden gedrückt So nun haben viele nicht Dieses T00L], ich habe es und mache es für Euch !Public!
[UPCOMING]VesvoraFly
12/20/2009 - Flyff PServer Advertising - 2 Replies
http://i47.tinypic.com/14t821y.jpg Wir sind Vesvora Fly und wir werden über einen Root mit den v14 Files laufen. Unsere Rates liegen bei: 50x 60x 80x Das Vesvora Fly Team:
Upcoming Releases
12/28/2007 - Main - 0 Replies
Hallo ich hab diesen thread mal für mich erstellt da ich ziemlich oft hier spiele reinstellen will die meiner meinung nach in die upcoming releases kommen ... Fang ich mal an mit Zu Online ... also ich hab schon viele spiele ausprobier ... gw, wow , kal , sro, etc etc .... aber hänge jetzt wircklich an zu online weisl enfach nur fun macht ... Ich sehe in diesem spiel auch ein gutes hack potential ^^ mfg
UpComing Quest
09/21/2007 - Conquer Online 2 - 2 Replies
Whats the next event coming up , If im not mistaken i think halloween is coming first and i heard they do events for holidays,. Does anyone kno what the event will be like?. And whats next after Halloween



All times are GMT +2. The time now is 22:19.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.