Jump to content

Question

Posted

Guys i want to make l2server status (ONlLINE,OFFLINE) and set it on webiste of server
For Example When server is Offline to the website ... says OFFLINE 
When is Online to website say ONLINE !!!  How can i make this????

Photo Example :
 

post-139373-0-51202300-1401476424_thumb.png
 

 

post-139373-0-51202300-1401476424_thumb.png

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

<?php
   $server_ip = "localhost";
   $loginserver_port = "7777";
   $gameserver_port = "2106";

   $login_status = @fsockopen( "$server_ip" , "$loginserver_port", $errno, $errstr, 0);
   $game_status = @fsockopen( "$server_ip" , "$gameserver_port", $errno, $errstr, 0);
   
              if($login_status){
      echo"Login:   Online<br />";
   }
   else{
      echo"Login::   Offline<br />";   
   }
   if($game_status){
      echo" Game:   Online<br />";
   }
   else{
      echo" Game:   Offline<br />";
   };
mysql_close($connect);
?>

Credits : Falcon

 

Login Server

<?php
    $status = @fsockopen("127.0.0.1", 2106, $errno, $errstr, 1);
if($status >= 1)
{ 
echo '<img src=images/on.png>';
}
else
{ 
echo '<img src=images/off.png>';
}

            ?>

Game Server

 

<?php
    $status = @fsockopen("127.0.0.1", 2106, $errno, $errstr, 1);
if($status >= 1)
{ 
echo '<img src=images/on.png>';
}
else
{ 
echo '<img src=images/off.png>';
}

            ?>

 

At <img src=images/on.png> replace with your image

Edited by FirefoxAurora
  • 0
Posted

man send me your skype name if you want to tell you something about this 

 

Just copy/paste the code in the html file and rename it from index.html to index.php and it will be fixed.

You won't be able to see results in your computer, you'll need to upload the website so you can see if it actually works.

Guest
This topic is now closed to further replies.


  • Posts

    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • THEY DON’T COME BACK FOR NO REASON. HERE’S WHY Our clients come from different countries and with very different tasks. But the strongest indicator of quality is simple — when a client comes back **for a second time**. This case is exactly that. The client returned with a request for a **German ID**. The requirement was clear: a document **in a male hand**, with a natural live scene and correct geographic context. What we did: ▪ accepted source files and data without unnecessary bureaucracy ▪ selected a **real street**, not a generic background ▪ built a print-ready mockup with correct scene logic ▪ sent it for approval ▪ after confirmation, delivered the **final file for printing** No templates. No “good enough”. Only solutions tailored to a specific task. Result: ▪ mockup approved on the first try ▪ client fully satisfied ▪ stays in touch We work **worldwide** — and that’s exactly why clients return. Contact us › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) *All data is published with the client’s consent.* #redraw #verification #documents #case #ID
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..