Converting MySQL to MSSQL

Results 1 to 3 of 3
  1. #1
    MC Web Designs Matt Clarke is offline
    MemberRank
    Oct 2010 Join Date
    UKLocation
    933Posts

    Converting MySQL to MSSQL

    Hey Guys. I kind of need a little bit of help converting this server status from MySQL to MSSQL since im not at all good at PHP coding.
    Code:
              <p align="center"><b> Login Server <br></b>
                <?php
    				$fp = @fsockopen("127.0.0.1", 23000, $errno, $errstr, 1);
    if($fp >= 1){ 
    echo 'Online';}
    else{ echo 'Offline'; } 
    			?>
                <br />
                <b><br>
                Char Server<br></b>
                <?php
    				$fp = @fsockopen("127.0.0.1", 28000, $errno, $errstr, 1);
    if($fp >= 1){ 
    echo 'Online';}
    else{ echo 'Offline'; } 
    			?>
                <br />
                <b><br>
               World Server<br></b>
                <?php
    				$fp = @fsockopen("127.0.0.1", 15400, $errno, $errstr, 1);
    if($fp >= 1){ 
    echo 'Online';}
    else{ echo 'Offline'; } 
    ?> <br>
    If you could add the code in that sort of layout, i would really appreciate it.

    Thanks guys!

    - Matt.


  2. #2
    Account Upgraded | Title Enabled! Spitfire76 is offline
    MemberRank
    Jun 2009 Join Date
    FranceLocation
    223Posts

    Re: Converting MySQL to MSSQL

    This is the code I use :

    <?php
    $fp_login = @fsockopen("127.0.0.1", 23000, $errno, $errstr, 1);
    $fp_char = @fsockopen("127.0.0.1", 28000, $errno, $errstr, 1);
    $fp_world = @fsockopen("127.0.0.1", 15400, $errno, $errstr, 1);
    if($fp_login >= 1 AND $fp_char >= 1 AND $fp_world >= 1)
    {
    echo 'Online';
    }

    else
    {
    echo 'Offline';
    }
    ?>
    This kind of code needs only PHP, MSSQL or MySQL aren't needed.

  3. #3
    MC Web Designs Matt Clarke is offline
    MemberRank
    Oct 2010 Join Date
    UKLocation
    933Posts

    Re: Converting MySQL to MSSQL

    Quote Originally Posted by Spitfire76 View Post
    This is the code I use :



    This kind of code needs only PHP, MSSQL or MySQL aren't needed.
    Oh right, ShadowDragon told me that on MSN. (About no need for Mssql, Mysql. Thanks for the script dude!

    Delete this thread please.



Advertisement