-
1 Attachment(s)
MuWeb Ban IP PHP
MuWeb Ban IP PHP
This script is used to ban someone`s IP,
Banned IP will not be able to view anymore your website.
INSTALL NOTES:
1.Copy files in your site
2.Open index.php and on first line add this:
PHP Code:
<? include("MuWeb_ban.inc.php"); ?>
3.Add ban ip in ban_ip_list.txt, example:
Code:
#127.0.0.1
#83.155.65.5
#89.55.78.68
NOTE*
- If you don`t have any ip to ban, leave in the ban_ip_list.txt the ip #127.0.0.1
- If your ban_ip_list.txt is empty no one will be able to view your website
Credits,
=Master=
-
Re: [Release] MuWeb Ban IP PHP
ok thankf for sharing 10/10
-
Re: [Release] MuWeb Ban IP PHP
Sweet ..thnx again!
Malice
-
Re: [Release] MuWeb Ban IP PHP
Sweeeeeeet, But people will still use proxy >.> pr if they have a dynamic ip ^^
-
Re: [Release] MuWeb Ban IP PHP
Quote:
Originally Posted by
Sartigan
Sweeeeeeet, But people will still use proxy >.> Page Ranking if they have a dynamic ip ^^
yea i know...but most of newbies will don`t know how to use proxy ^_^
-
Re: [Release] MuWeb Ban IP PHP
hehe nice and simple ;) thanx for sharing
-
Re: [Release] MuWeb Ban IP PHP
wtf, why did i say page ranking? D:
-
Re: [Release] MuWeb Ban IP PHP
Thanks,
but can i add to ban_ip_list all IP like
#12.0.0.0 - 12.255.255.255 ?
-
Re: [Release] MuWeb Ban IP PHP
thanks master
10/10!
you are the best coder in php ^^
-
Re: [Release] MuWeb Ban IP PHP
Quote:
- If you don`t have any ip to ban, leave in the ban_ip_list.txt the ip #127.0.0.1
err but actually if i block my own ip then i cant see website too :o
lol but works nice on others
well works if theres more than 1 ip
even if just one empty line after #127.0.0.1
now need to make some editbox for it ;)
-
Re: [Release] MuWeb Ban IP PHP
Hah i don`t liked verry much account menager but this is good :)
i`ts easy, but maybe you must add this to Admin Area :) so anyone can ban users from The Admin Panel... I will try to add it :P
So 8/10 :)
-
Re: [Release] MuWeb Ban IP PHP
Easy to stop little annoying ppl. Thx.
-
Re: [Release] MuWeb Ban IP PHP
Very good but i would like to ask something if posible.
If we could search a specific ip to see which accounts (maybe more than 1) has loged in game :)
-
Re: [Release] MuWeb Ban IP PHP
-
Re: [Release] MuWeb Ban IP PHP
-
Re: [Release] MuWeb Ban IP PHP
Quote:
Originally Posted by
Booms
Thanks,
but can i add to ban_ip_list all IP like
#12.0.0.0 - 12.255.255.255 ?
nop, only by lines
-
Re: [Release] MuWeb Ban IP PHP
Nice . It work fine .
=Master= , When edit your Mu Web , i have 1 query :
Quote:
$query = "select top 5 name,resets,onlinehours
from character inner join memb_stat on accountid=memb___id
where accountid in ( select top 5 memb___id from memb_stat order by onlinehours desc )
and name in ( select top 1 name from character where accountid=memb___id order by resets desc)
order by onlinehours desc";
$result = $db->Execute($query);
$row = $result->fetchrow();
Run this query on SQL Query Analyzer , i got the result of top character onlinehours but when copy it into web like that . it notice me : Fatal error: Call to a member function fetchrow() on a non-object
So what's the problem here ? My web or my code or my pc ?
1 more :
I added function jewel_check in web_modules.php to check for jewel when reset character
Quote:
function jewel_check($character){
require("config.php");
$inventory_result_sql = $db->Execute("SELECT Inventory FROM Character WHERE (Character.[Name] = '$character')");
$inventory_result = $inventory_result_sql->fetchrow();
$inventory = $inventory_result[0];
$inventory = bin2hex($inventory);
$inventory = strtoupper($inventory);
//echo($inventory);
$chaos = 0;
$joc = 0;
$blue = 0;
for($x=0; $x<108; ++$x)
{
$item = substr($inventory,$x*32,32);
$chaos = $chaos + substr_count($item, '0F00');
$joc = $joc + substr_count($item, 'D600');
$blue = $blue + substr_count($item, '0E00');
}
$j = array( 'chaos' => $chaos,
'joc' => $joc,
'blue' => $blue);
return $j;
}
but i can check only 4 jewel at here
http://img297.imageshack.us/img297/9691/jewellv1.jpg
I think the problem is $inventory = bin2hex($inventory); . It have limited .
If you know how to fix this please help me. Thanks
-
Re: [Release] MuWeb Ban IP PHP
Try like this :
PHP Code:
$query = "select top 5 name,resets,onlinehours
from character inner join memb_stat on accountid=memb___id
where accountid in ( select top 5 memb___id from memb_stat order by onlinehours desc )
and name in ( select top 1 name from character where accountid=memb___id order by resets desc)
order by onlinehours desc";
$result = mssql_query($query);
$row = mssql_fetch_row($result);
and output the result with $row
-
Re: [Release] MuWeb Ban IP PHP
Tried it . no more error but it show nothing.
Quote:
$query = "select top 5 name,resets,onlinehours
from character inner join memb_stat on accountid=memb___id
where accountid in ( select top 5 memb___id from memb_stat order by onlinehours desc )
and name in ( select top 1 name from character where accountid=memb___id order by resets desc)
order by onlinehours desc";
$result = mssql_query($query);
for($i=0;$i < $top_rank;++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
$content .="<tr>
<td align=center width='94'>$rank</td>
<td align=center width='94'><div class='link_rankings'><a href=main.php?op=character&character=$row[0]>$row[0]</a></div></td>
<td align=right width='94'>$row[2]</td>
</tr>";
}
-
Re: [Release] MuWeb Ban IP PHP
Thats because theres no connection to the db
try like this :
PHP Code:
$con = mssql_connect('127.0.0.1',' sa',' SQL pass');
mssql_select_db('MuOnline', $con);
$query = "select top 5 name,resets,onlinehours
from character inner join memb_stat on accountid=memb___id
where accountid in ( select top 5 memb___id from memb_stat order by onlinehours desc )
and name in ( select top 1 name from character where accountid=memb___id order by resets desc)
order by onlinehours desc";
$result = mssql_query($query);
for($i=0;$i < $top_rank;++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
$content .="<tr>
<td align=center width='94'>$rank</td>
<td align=center width='94'><div class='link_rankings'><a href=main.php?op=character&character=$row[0]>$row[0]</a></div></td>
<td align=right width='94'>$row[2]</td>
</tr>";
}
-
Re: [Release] MuWeb Ban IP PHP
Useful release
_________________________
MuWeb Team
MuWeb - THE PHP RESOURCE FOR MMORPG
-
Re: [Release] MuWeb Ban IP PHP
I think more simple is just using .htaccess document.
My .htacces document:
Quote:
Order Allow,Deny
Allow from all
Deny from 81.198.14.14
Where deny from 81.198.14.14, just change to you needed ip and webserver will block connecting this looser to your ip :))
-
Re: [Release] MuWeb Ban IP PHP
Realy Master is back Again! :) Thnx 10/10
Sorry for bad english
-
Re: [Release] MuWeb Ban IP PHP
master...i have one question for you :) you are romanian?
-
Re: [Release] MuWeb Ban IP PHP
i'll answer for him
yes, he is
-
Re: [Release] MuWeb Ban IP PHP
-
Re: [Release] MuWeb Ban IP PHP
Quote:
Originally Posted by
=Master=
yea i know...but most of newbies will don`t know how to use proxy ^_^
There are so many free web proxy servers - just paste url and go :) it is so easy everyone can make it
-
Re: [Release] MuWeb Ban IP PHP
Quote:
Originally Posted by
zabovad
There are so many free web proxy servers - just paste url and go :) it is so easy everyone can make it
I agree, you better code anti-proxy as well, if thats possible :wink:
-
Re: [Release] MuWeb Ban IP PHP
I wanna ban ip also for access to mu server ..
is it possible?