PHP Status/Acc creation/Online players Scripts

Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 68
  1. #16
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    Quote Originally Posted by Remcolineage View Post
    Hy nice share but one question why my status don't work? It says always offline even if my server IS online. :S This is with all status scripts i downloaded... Im using Vista ( please i don't want to hear, vista is bad etc... ) and im using as server pack:
    L2oneo rev 1617.

    Please someone help me,
    Thanks Remco
    Welll there is a problem with the php code i am writting to you what you have to write:

    <?php
    $server = "Host";
    $portg = "7777";
    $portl = "2106";
    $timeout = "1";

    $game = @fsockopen("$server", $portg, $errno, $errstr, $timeout);
    $login = @fsockopen("$server", $portl, $errno, $errstr, $timeout);

    print'<table width="150">';
    if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
    else { print'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
    if($game) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
    else { print'<tr><td>Game:</td><td><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
    print'</table>';
    ?>
    If it does not work try change the site from html to php. I hope a helped.

    From Lineage II Unknown Private Server
    TopG@mer

  2. #17
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    Quote Originally Posted by vvizzi View Post
    Online Players:

    This script connects to the database(that means you need to have php connected to sql.. if you need any help with it try searching with google for apache php mysql install guides and i bet first link will work). Ive explained some of the code.. so learning from it should be easy..

    Code:
    <?php
    //first you need to define db info
      define('mySQL_hostname', '127.0.0.1');  //database IP
      define('mySQL_database', 'Database');  //database name
      define('mySQL_username', 'User');  //database user
      define('mySQL_password', 'Pass');  //database password
    
    //connects to mysql
      $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )
        or die( 'Error connecting to mysql<br><br>'.mysql_error() );
    
    //connects to Database
      $db_select = mysql_select_db( mySQL_database, $db_link )
        or die( 'Error connecting to Database<br><br>'.mysql_error() );
    
    //selects desired table
       $chars=mysql_query("SELECT * FROM characters");
    
    //tells how much rows are there (will come helpfull with while loops)
       $rows =mysql_numrows($characters);
    
       $i=0;
       $x=0;
    
    //while $i is smaller than number of rows repeat the code
       while ($i < $rows) {
        $online=mysql_result($chars,$i,"online"); //looks into characters table, under column online(if player is online its "0" else "1"), at row $i
        if ($online == 1) { $x++; } // if column online at row $i is "1", increase $x
        $i++; //increase $i
        }
       print 'Online players:<em>'.$x.'<em>'; //prints out the $x number of players online
    ?>
    when i set up this i get this error:

    Code:
    Warning:  mysql_pconnect():  in /mnt/w0602/d17/s23/b02c4150/www/vip/unknown/online.php on line 17
    Error connecting to mysql
    any idea anyone??

    TopG@mer

  3. #18
    Proficient Member vvizzi is offline
    MemberRank
    Jul 2007 Join Date
    LocatedLocation
    151Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    well it tells you whats wrong.... it cant connect to your database so ether you dont have a php supported server with mysql extensions enabled.. or you entered wrong connection data..

    try using just this snippet no matter if your file is .html or .php lol...
    <?php
    phpinfo();
    ?>

    and if you get php, mysql.... info printed out then it works..

  4. #19
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    I have navicat, how do i set up it to work for php???

  5. #20
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    sry i mean web server

  6. #21
    Proficient Member vvizzi is offline
    MemberRank
    Jul 2007 Join Date
    LocatedLocation
    151Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    web servers like apache for instance.. usually dont have php included.. so doh.. you need to include them and after that happens.. you should enable a php extension called mysql or whatever database you run.

    i suggest you just download some pack.. like wamp or easyphp is even faster to setup.. this packs already support php.. but you still need to enable connection to mysql..

    ether way.. stop spamming here lol.. its just a simple script and you want help on setting up a web server o.O

  7. #22
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    can you send the code for how many clans and whick are there and how many gms are online and for players too (for players if you can send how to show how many and who are online)

    Sorry for bad english

  8. #23
    Apprentice TopG@mer is offline
    MemberRank
    Dec 2007 Join Date
    7Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    vvizzi i need you if you have msn please add me to help with something mine is h.tsirikos@hotmail.com.

    It is important i have mysql and navicat and i dont know how to set it up for tha site. Also i need a code for showing whick and how clans are there.

  9. #24
    Apprentice Amadi510 is offline
    MemberRank
    Jul 2007 Join Date
    6Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    You Rulez man !!!!!! nice scripts ;)

  10. #25
    Account Upgraded | Title Enabled! xsilentx is offline
    MemberRank
    Dec 2006 Join Date
    213Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    Just looking at your script, doesn't even look like you coded it yourself. Or even made it by yourself without any copy and pasting.

  11. #26
    Proficient Member vvizzi is offline
    MemberRank
    Jul 2007 Join Date
    LocatedLocation
    151Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    well i have to say i waited for someone wise enough to come by and tell me what i did... all tho i let myself low enough to actually answer that.. i got to say your name sounds familiar too.. and btw that pic hmm.... and your rank new blood..? where did i hear that... and while im at it i have to say you made the best speed test i ever saw ^^..

    come on man ofcourse i learned it from somewhere.. i used to write in c and started with mirc scripting xD... then i got bored and started a real project.. so i went on l2j cuz at least im productive and ppl can enjoy my work.. so i got to same problem.. most ppl run into.. web page.. and after first few dreamweawer tryes i realized.. ill just have to do it the old way.. so i knew html from before lol.. who doesnt.. and then i got to php what else.. and a bit of js... to make it look better... so i was satisfied with the way it looks (photoshop ftw) but i noticed most ppl get lost on private servers features and dont have the proper overview on your "costom" stuff.. so i learned sql querys (which came in more than just handy once my database got flooded with newbie mistakes or events or whatever came in the way...) and made a page driven database overview like l2wh has... or official l2 page ofcourse (but kamael).. so after a month or so i was finished and decided to contribute to ragezone since i learned so much from other ppls work..and i couldnt find a proper php acc creation(damn sha1) script..
    anyway i copy/pasted those scripts from my own page and moded it.. i smoke to much so what.. and got few bugs in first post.. which were fixed soon after. i admit i learned from ppl ofcourse lol.. better than looking threw pages of books written for first time windows users.. so i use google big deal ^^, but i write every inch of my code myself duh.. and even the textures made by kaali or some other talented poster on rz i might of used to make my sever a bit more interesting.. have credits on servers page.

    anyway since its holidays and i actually have enough time to answer that.. and tell you all about my skills maybe you can share with us.. where you got your guru social skills on ppl.. and why decide to judge my work based only on good will.. while all you did is spam..

    and just so no grudges and all... you should consider learning to speak english.. and idk.. maybe write some of that fancy signature?

  12. #27

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    could be useful sometimes these scripts :)

  13. #28
    Gamma Droppo is offline
    MemberRank
    Jul 2004 Join Date
    ElmoreLocation
    3,051Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    Quote Originally Posted by xsilentx View Post
    Just looking at your script, doesn't even look like you coded it yourself. Or even made it by yourself without any copy and pasting.
    Well... Instead comming here and flaming just for free without actually adding anything useful, why don't you write a better one and share it to show that you really know about this and you're not one of those "I-flame-ppl's-work,-but-I'm-so-lame-to-make-a-better-one" coz that kind of ppl we have a lot and believe me I love to infract them and they are not really welcome here...

    Droppo.-

  14. #29
    Account Upgraded | Title Enabled! rozandas is offline
    MemberRank
    Feb 2006 Join Date
    USA, FloridaLocation
    806Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    I still can't get it to work

    Im trying on W3Schools HTML TestBed But it still doesn't work, Im also trying in Dreamweaver but still isnt working.
    Code:
    <html>
    <body>
    <?php
        printf '<table width="100">';
        $server  = "127.0.0.1";
        $portl   = "7777";
        $portc   = "7778";
        $portm   = "9014";
        $timeout = "5";
    
        if ($server and $port and $timeout) {
        	$login =  @fsockopen("$server", $portl, $errno, $errstr, $timeout);
            $char =  @fsockopen("$server", $portc, $errno, $errstr, $timeout);
            $map =  @fsockopen("$server", $portm, $errno, $errstr, $timeout);
        }
        printf'<tr><td align="center"><strong>Server Status</strong></td></tr>';
        if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
        else { printf'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
        if($char) { printf'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
        else { printf'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; } 
        if($map) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
        else { print'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
        print'</table>';
    ?>
    </body>
    </html>

  15. #30
    Proficient Member vvizzi is offline
    MemberRank
    Jul 2007 Join Date
    LocatedLocation
    151Posts

    Re: [Share/Guide]PHP Status/Acc creation/Online players Scripts

    yeah lol and w3s will let you test php? o.O
    also dw.. you seriously think it supports php?
    and last thing... you really think it would work without php?

    download wamp or some other pre-configured packs and you can test it fast..



Page 2 of 5 FirstFirst 12345 LastLast

Advertisement