Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 04:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



SEA EMU - Easy to mod server status page

Discussion on SEA EMU - Easy to mod server status page within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2010
Posts: 108
Received Thanks: 22
SEA EMU - Easy to mod server status page

Okay credits goes to the .

This one lists all account names, (still with .ini but they are trying to fix that)
PHP Code:
<b>Total Number of Accounts:</b>
<?php
$directory 
opendir("ENTER SEA ACCOUNT DIRECTORY HERE");
while(
$item readdir($directory)){
if((
$item != ".") && ($item != "..")){
$files[] = $item;
echo 
"";
}
}
$sizeofarray count($files);
echo 
$sizeofarray;
?>
<br>
Next one shows in numbers how many accounts there are
PHP Code:
<br>
<b>List of accounts:</b></br>
<?php
// directory path can be either absolute or relative
$dirPath 'ENTER SEA ACCOUNT DIRECTORY HERE';

// open the specified directory and check if it's opened successfully
if ($handle opendir($dirPath)) {

   
// keep reading the directory entries 'til the end
   
while (false !== ($file readdir($handle))) {

      
// just skip the reference to current and parent directory
      
if ($file != "." && $file != "..") {
         if (
is_dir("$dirPath/$file")) {
            
// found a directory, do something with it?
            
echo "[$file]<br>";
         } else {
            
// found an ordinary file
            
echo "$file<br>";
         }
      }
   }

   
// ALWAYS remember to close what you opened
   
closedir($handle);
}
?>
Just fill in "ENTER SEA ACCOUNT DIRECTORY HERE" and remember not to add "\" in the end. like:
Code:
C:\Storage\
if you do, it will not work

Next one show if the server is online or not:

Just mod the: $fp = fsockopen("SERVER IP", 80, $errno, $errstr, 2);
where "Server ip", port (could also be 15779 if you only wanna show the sro server status), $errno, $errstr, default timeout in sec.)"
PHP Code:
<?php
error_reporting
(0); 
$fp fsockopen("SERVER IP"80$errno$errstr2);
if (!
$fp
{
    echo 
'<FONT COLOR=red>Offline</FONT>';

else 
{
    echo 
'<FONT COLOR=green>Online</FONT>';
}
    
fclose($fp);

?>
psrobot is offline  
Old 05/12/2010, 22:02   #2
 
elite*gold: 0
Join Date: Dec 2008
Posts: 536
Received Thanks: 116
Looks good, I dont have a server though so i dont know if it works
sargentgunner is offline  
Old 05/12/2010, 23:26   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 129
Received Thanks: 133
looks like u took the php code of
DaRealMadafaka is offline  
Old 05/12/2010, 23:27   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 129
Received Thanks: 133
Quote:
Originally Posted by psrobot View Post
Okay credits goes to the .

This one lists all account names, (still with .ini but they are trying to fix that)
PHP Code:
<b>Total Number of Accounts:</b>
<?php
$directory 
opendir("ENTER SEA ACCOUNT DIRECTORY HERE");
while(
$item readdir($directory)){
if((
$item != ".") && ($item != "..")){
$files[] = $item;
echo 
"";
}
}
$sizeofarray count($files);
echo 
$sizeofarray;
?>
<br>
Next one shows in numbers how many accounts there are
PHP Code:
<br>
<b>List of accounts:</b></br>
<?php
// directory path can be either absolute or relative
$dirPath 'ENTER SEA ACCOUNT DIRECTORY HERE';

// open the specified directory and check if it's opened successfully
if ($handle opendir($dirPath)) {

   
// keep reading the directory entries 'til the end
   
while (false !== ($file readdir($handle))) {

      
// just skip the reference to current and parent directory
      
if ($file != "." && $file != "..") {
         if (
is_dir("$dirPath/$file")) {
            
// found a directory, do something with it?
            
echo "[$file]<br>";
         } else {
            
// found an ordinary file
            
echo "$file<br>";
         }
      }
   }

   
// ALWAYS remember to close what you opened
   
closedir($handle);
}
?>
Just fill in "ENTER SEA ACCOUNT DIRECTORY HERE" and remember not to add "\" in the end. like:
Code:
C:\Storage\
if you do, it will not work

Next one show if the server is online or not:

Just mod the: $fp = fsockopen("SERVER IP", 80, $errno, $errstr, 2);
where "Server ip", port (could also be 15779 if you only wanna show the sro server status), $errno, $errstr, default timeout in sec.)"
PHP Code:
<?php
error_reporting
(0); 
$fp fsockopen("SERVER IP"80$errno$errstr2);
if (!
$fp
{
    echo 
'<FONT COLOR=red>Offline</FONT>';

else 
{
    echo 
'<FONT COLOR=green>Online</FONT>';
}
    
fclose($fp);

?>
PHP Code:
$fp = @fsockopen("Hier eure Root Server oder Hamachi IP!",15779,&$errno,&$errstr,2);
if(!
$fp)
   {
   echo 
'<img src="off.png" width="250" height="80" border="0"';
   }
else
   {
   echo 
'<img src="on.png" width="250" height="80" border="0"';

Yep, u changed just , how the website should looks , if the server is off or on.
DaRealMadafaka is offline  
Reply


Similar Threads Similar Threads
SEA EMU - Easy to mod reg. page
09/26/2010 - SRO Private Server - 18 Replies
Okay credits goes to the moSro team. <?php error_reporting(0); // Get form variables $account=$_POST; $pass=$_POST; if($account=="" || $pass==""){
Server status page
07/18/2009 - SRO Private Server - 7 Replies
is this an bug or is sunworld rlly online =? Serverstatus
Sunsro open;Status page...
07/18/2009 - SRO Private Server - 60 Replies
Serverstatus http://pserverstatus.dj-xrare.org/ Umm? Yea Ill be flammed for opening a new topic. But what everr



All times are GMT +2. The time now is 04:16.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.