Unique Ranking [PHP]

Results 1 to 13 of 13
  1. #1
    Novice sefa76 is offline
    MemberRank
    Sep 2011 Join Date
    4Posts

    Unique Ranking [PHP]

    Hey Guys,
    This My First Release :)

    Now Starting :)

    I <3 Ragezone :)
    Table Codes :)
    Code:
    CREATE TABLE [dbo].[killl](
    	[name] [varchar](50) NULL,
    	[uniq] [varchar](50) NULL,
    	[tarih] [varchar](50) NULL
    ) ON [PRIMARY]
    PHP Code:
    <?php

    // Here Mssql Connects 



        
    $sqltb "dbo.Killl"// Table Name
        
    $query $mssql->dbQuery("TRUNCATE TABLE $sqltb");


    $todaydate=@date("Y-m-d");

    $dosya fopen("c:\\Users\\Administrator\\Desktop\\BlackRogue+Package\\server\\Server\\".$todaydate."_FatalLog.txt""r");
    // Here Server Path :) or Gameserver Path




    while( ! feof($dosya) ) {

    $yaz fgets($dosya);
    $server=substr($yaz,20,15);

        if(
    $server=="[SR_GameServer]"){
        
    $uniquekilled=substr($yaz,36,22);
            if(
    $uniquekilled=="Unique Monster Killed!"){
            
    $uniquekilleds=substr($yaz,36,22);
               if(
    $uniquekilleds=="Unique Monster Killed!"){
                
    $data=substr($yaz,0,10);
                
    $hora=substr($yaz,11,8);
                
                
    $minutos=substr($hora,3,2);
                
    $hora=substr($hora,0,2);
                
    $minutos=(int)$minutos+(60*(int)$hora);
                
    $passou=$agoram-$minutos;
                
    $fimpos=strrpos($yaz,"]",66);
                
    $fimpos=$fimpos-66;
                
    $uniquestr=substr($line,66,$fimpos);
                
    $fimpos=strrpos($uniquestr,"]");
                
    $unique=substr($uniquestr,0,$fimpos);
                
    $fimpos+=6;
                
    $char=substr($uniquestr,$fimpos,20);
              list(
    $tarih$saat $game$uniq$monster$killed$uniqadi$by$kill) = explode(" "$yaz);
              
    $uniqueadi explode(" ",$yaz);
              list (
    $perf$log) = explode("["$killed);
    list (
    $perfs$logs) = explode("]"$log);
    list (
    $tarihh$game$zaman$time) = explode("[SR_GameServer]"$tarih);
    list (
    $tarihp$saat) = explode("$todaydate"$tarihh);


    if (
    $uniq == "UNIQUE[MOB_RM_TAHOMET]"){

    $uniq "Demon Shaitan";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_TK_BONELORD]"){

    $uniq "Lord Yarkan";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_AM_IVY]"){

    $uniq "Captain IVY";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");

    }elseif (
    $uniq == "UNIQUE[MOB_OA_URUCHI]"){

    $uniq "Uruchi";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_EU_KERBEROS]"){

    $uniq "Cerberus";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }
    elseif (
    $uniq == "UNIQUE[MOB_KK_ISYUTARU]"){

    $uniq "Isyutaru";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_CH_TIGERWOMAN]"){

    $uniq "Tiger Girl";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif(
    $uniq == "UNIQUE[MOB_FW_TAESE_100]"){

    $uniq "Tai Sui(100 LvL)";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }


    }}





    }}





    fclose($dosya);?>
    <div class="page-body newsblock">
        <div class="news-title">
            Unique Ranking
        </div>
        <table style="border:1px solid #3f3f3f; border-radius: 8px 8px 8px 8px;padding: 4px;background-color:rgba(50,50,50,0.55);text-align:center;color: #fff;font-weight: bold; font-family: Arial, Helvetica, sans-serif;font-size:12px;" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);"></td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Killer</td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Uniq Name</td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Date</td>
            </tr>
            <?php
                $rank 
    $mssql->dbQuery("SELECT top 50 * FROM $sqltb ORDER BY tarih desc");
                
    $place 1;
                while(
    $row sqlsrv_fetch_array($rankSQLSRV_FETCH_ASSOC)) {
                    echo 
    '<tr>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$place.'</td>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['name'].'</td>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['uniq'].'</td>';    
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['tarih'].'</td>';
                    echo 
    '</tr>';
                    
    $place ++;
                }
                
    sqlsrv_free_stmt($rank);
            
    ?>
        </table>


  2. #2
    Valued Member badibatu is offline
    MemberRank
    Sep 2011 Join Date
    122Posts

    Re: Unique Ranking [PHP]

    nice one keep it up

  3. #3
    Account Upgraded | Title Enabled! LastThief is offline
    MemberRank
    Aug 2010 Join Date
    204Posts

    Re: Unique Ranking [PHP]

    actually this means when each one go on that page it will get executed and the player will get new points lol you're making it too complex here is snippet of code

    if($server=="[SR_GameServer]"){
    $uniquekilled=substr($line,36,22);
    if($uniquekilled=="Unique Monster Killed!"){
    $pos=strrpos($line,"]",66);
    $pos=$pos-66;
    $uniquestr=substr($line,66,$pos);
    $pos=strrpos($uniquestr,"]");
    $unique=substr($uniquestr,0,$pos);
    $pos+=6;
    $char=substr($uniquestr,$pos,20);
    getUniqueKills($unique,$char);

    }

    }

  4. #4
    Banned NoMore is offline
    BannedRank
    Oct 2011 Join Date
    Alexandria, EgyLocation
    268Posts

    Re: Unique Ranking [PHP]

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\uniqueranking.php on line 8

    Line 8= $query = $mssql->dbQuery("TRUNCATE TABLE $sqltb");

  5. #5
    Account Upgraded | Title Enabled! nonesense1 is offline
    MemberRank
    Jan 2012 Join Date
    241Posts

    Re: Unique Ranking [PHP]

    this is working good (the rank itself)
    but i get those :

    Notice: Undefined variable: agoram in C:\xampp\htdocs\mod\uniquekill.php on line 32

    Notice: Undefined variable: line in C:\xampp\htdocs\mod\uniquekill.php on line 35

    Notice: Undefined offset: 8 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    Notice: Undefined offset: 7 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    Notice: Undefined offset: 6 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    hundreds of those.. and in the bottom the ranking (does work!)

    anyway to remove those errors ?

  6. #6
    Apprentice nlginsane is offline
    MemberRank
    Feb 2012 Join Date
    8Posts

    Re: Unique Ranking [PHP]

    to remove php errors fix them or dirty-fix them by putting this into your script:

    error_reporting(0);

    have fun =)

  7. #7
    Account Upgraded | Title Enabled! nonesense1 is offline
    MemberRank
    Jan 2012 Join Date
    241Posts

    Re: Unique Ranking [PHP]

    well , that's what i did - but still those errors not coming from no where.. , they must be there because something is **** up..

    i would love to know how to fix them :D

    i already got rid for few of them by removing not decleared data.

  8. #8
    Member asi is offline
    MemberRank
    Dec 2011 Join Date
    54Posts

    Re: Unique Ranking [PHP]

    help error

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\index.php on line 8

  9. #9
    Enthusiast ajan005 is offline
    MemberRank
    Feb 2012 Join Date
    36Posts

    Re: Unique Ranking [PHP]

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 7

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 7

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 59

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 59

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 75

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 75

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\AppServ\www\rank\rank.php on line 75



    Guys help to fix this lines.
    Whats the wrongs with php codes?

  10. #10

    Re: Unique Ranking [PHP]

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\index.php on line 8

    how can i fix this?

  11. #11
    Member anikan1985 is offline
    MemberRank
    Feb 2012 Join Date
    97Posts

    Re: Unique Ranking [PHP]

    its not working for me :(

  12. #12
    Novice Murderer05 is offline
    MemberRank
    Apr 2012 Join Date
    1Posts

    Re: Unique Ranking [PHP]

    I need Asp Versiyon pls help me

  13. #13

    Re: Unique Ranking [PHP]

    so almost work now... change the "$mssql->dbQuery" to "mssql_query" and the db errors gone. One thing i can't understand. What is this: Notice: Undefined variable: line? "$line" is not defined? o.O



Advertisement