MuWeb Ban IP PHP

Page 1 of 2 12 LastLast
Results 1 to 25 of 29
  1. #1
    Account Upgraded | Title Enabled! =Master= is offline
    MemberRank
    May 2006 Join Date
    <? here ?>Location
    507Posts

    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=
    Attached Files Attached Files


  2. #2
    Alpha Member christoper is offline
    MemberRank
    Aug 2007 Join Date
    PhP DecoderLocation
    1,560Posts

    Re: [Release] MuWeb Ban IP PHP

    ok thankf for sharing 10/10

  3. #3
    Account Upgraded | Title Enabled! Malice2010 is offline
    MemberRank
    Jun 2007 Join Date
    195Posts

    Re: [Release] MuWeb Ban IP PHP

    Sweet ..thnx again!

    Malice

  4. #4
    Pyro Dude Sartigan is offline
    MemberRank
    Jan 2007 Join Date
    You Care?Location
    1,457Posts

    Re: [Release] MuWeb Ban IP PHP

    Sweeeeeeet, But people will still use proxy >.> pr if they have a dynamic ip ^^

  5. #5
    Account Upgraded | Title Enabled! =Master= is offline
    MemberRank
    May 2006 Join Date
    <? here ?>Location
    507Posts

    Re: [Release] MuWeb Ban IP PHP

    Quote Originally Posted by Sartigan View Post
    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 ^_^

  6. #6
    Dynamic commandcom is offline
    MemberRank
    Jan 2005 Join Date
    EstoniaLocation
    1,959Posts

    Re: [Release] MuWeb Ban IP PHP

    hehe nice and simple ;) thanx for sharing

  7. #7
    Pyro Dude Sartigan is offline
    MemberRank
    Jan 2007 Join Date
    You Care?Location
    1,457Posts

    Re: [Release] MuWeb Ban IP PHP

    wtf, why did i say page ranking? D:

  8. #8
    Play4Freeā„¢ Booms is offline
    MemberRank
    Jun 2005 Join Date
    worldwideLocation
    489Posts

    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 ?

  9. #9
    Account Upgraded | Title Enabled! Colbert is offline
    MemberRank
    Sep 2007 Join Date
    ArgentinaLocation
    232Posts

    Re: [Release] MuWeb Ban IP PHP

    thanks master
    10/10!
    you are the best coder in php ^^

  10. #10
    Dynamic commandcom is offline
    MemberRank
    Jan 2005 Join Date
    EstoniaLocation
    1,959Posts

    Re: [Release] MuWeb Ban IP PHP

    - 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 ;)

  11. #11
    Account Upgraded | Title Enabled! Lisko is offline
    MemberRank
    Dec 2007 Join Date
    BulgariaLocation
    440Posts

    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 :)

  12. #12
    Account Upgraded | Title Enabled! RayOfLight is offline
    MemberRank
    Jun 2006 Join Date
    EverywhereLocation
    1,301Posts

    Re: [Release] MuWeb Ban IP PHP

    Easy to stop little annoying ppl. Thx.

  13. #13
    Member Sir_Charles is offline
    MemberRank
    May 2007 Join Date
    58Posts

    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 :)

  14. #14
    Account Upgraded | Title Enabled! DestructiO is offline
    MemberRank
    Apr 2007 Join Date
    486Posts

    Re: [Release] MuWeb Ban IP PHP


  15. #15
    Twilight Mu Owner Shagoon is offline
    MemberRank
    Aug 2005 Join Date
    Bucharest, ROLocation
    1,001Posts

    Re: [Release] MuWeb Ban IP PHP


  16. #16
    Account Upgraded | Title Enabled! =Master= is offline
    MemberRank
    May 2006 Join Date
    <? here ?>Location
    507Posts

    Re: [Release] MuWeb Ban IP PHP

    Quote Originally Posted by Booms View Post
    Thanks,
    but can i add to ban_ip_list all IP like
    #12.0.0.0 - 12.255.255.255 ?
    nop, only by lines

    Code:
    #ip
    #ip
    #ip

  17. #17
    Valued Member levinthan9 is offline
    MemberRank
    May 2006 Join Date
    149Posts

    Re: [Release] MuWeb Ban IP PHP

    Nice . It work fine .

    =Master= , When edit your Mu Web , i have 1 query :

    $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

    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


    I think the problem is $inventory = bin2hex($inventory); . It have limited .
    If you know how to fix this please help me. Thanks

  18. #18
    Account Upgraded | Title Enabled! DestructiO is offline
    MemberRank
    Apr 2007 Join Date
    486Posts

    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

  19. #19
    Valued Member levinthan9 is offline
    MemberRank
    May 2006 Join Date
    149Posts

    Re: [Release] MuWeb Ban IP PHP

    Tried it . no more error but it show nothing.
    $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>";
    }

  20. #20
    Account Upgraded | Title Enabled! DestructiO is offline
    MemberRank
    Apr 2007 Join Date
    486Posts

    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>"
    ;  


  21. #21
    Proficient Member DiabloMu Admin is offline
    MemberRank
    Jun 2007 Join Date
    My Own WorldLocation
    154Posts

    Re: [Release] MuWeb Ban IP PHP

    Useful release

    _________________________
    MuWeb Team
    MuWeb - THE PHP RESOURCE FOR MMORPG

  22. #22
    Account Upgraded | Title Enabled! bagadzelna is offline
    MemberRank
    Apr 2005 Join Date
    265Posts

    Re: [Release] MuWeb Ban IP PHP

    I think more simple is just using .htaccess document.
    My .htacces document:
    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 :))

  23. #23
    Account Upgraded | Title Enabled! DraGoN-GR is offline
    MemberRank
    Dec 2007 Join Date
    404 not foundLocation
    256Posts

    Re: [Release] MuWeb Ban IP PHP

    Realy Master is back Again! :) Thnx 10/10


    Sorry for bad english

  24. #24
    Apprentice Mosad is offline
    MemberRank
    May 2007 Join Date
    7Posts

    Re: [Release] MuWeb Ban IP PHP

    master...i have one question for you :) you are romanian?

  25. #25
    Proficient Member DiabloMu Admin is offline
    MemberRank
    Jun 2007 Join Date
    My Own WorldLocation
    154Posts

    Re: [Release] MuWeb Ban IP PHP

    i'll answer for him

    yes, he is



Page 1 of 2 12 LastLast

Advertisement