Player and CW time script

Status
Not open for further replies.
I Have The Online Stats But Not The CW Time.
Maybe The Other Will Help You.

<!-- Online Status -->
<tr><td><center><table border=0>
<?php

$file = file ("D:\All Server\RF Server 2.2.3.2\Server\SERVER\ZoneServer 2.2.3.2\SystemSave\ServerDisplay.ini"); << Change With Your ServerDisplay.ini Files Directory
foreach($file as $line)
{
if(strspn($line, "[") != 1)
parse_str($line);
}

function statuscheck($serverip, $port) {
$sockres = @fsockopen($serverip, $port, $errno, $errstr, 1);
if (!$sockres) {
return "<img src=/images/off.gif>";
} else {
@fclose($sockres);
return "<img src=/images/on.gif>";
}
}



$serverip = "127.0.0.1"; << You Can Change With Your IP or Keep it.

echo "<b><font size=4 color=#9193a6>";
echo " Login: " . statuscheck($serverip, "10001");
echo " Server: " . statuscheck($serverip, "27780");

echo "<tr><td><font color=#768a62>Cora Alliance :<td><font color=lime> $C_Num
<td style=padding-left:15px><font color=#aa9286>Accretia Empire :<td><font color=lime> $A_Num
<td style=padding-left:15px><font color=#86b2ba>Bellato Federation :<td><font color=lime> $B_Num";

echo "<tr><td><font color=#768a62> Cora HQ : <td><font color=lime> $NeutralC
<td style=padding-left:15px><font color=#aa9286> Accretia HQ : <td><font color=lime> $NeutralA
<td style=padding-left:15px><font color=#86b2ba>Bellato HQ: <td><font color=lime> $NeutralB <br>";


echo "<tr><td><font color=#768a62> Haram Stockade :<td><font color=lime> $NeutralCS1
<td style=padding-left:15px><font color=#aa9286> Armory-213 : <td><font color=lime> $NeutralAS1
<td style=padding-left:15px><font color=#86b2ba> Solus Settlement: <td><font color=lime> $NeutralBS1 <br>";


echo "<tr><td><font color=#768a62> Numerus Stockade : <td><font color=lime> $NeutralCS2
<td style=padding-left:15px><font color=#aa9286> Armory-117 : <td><font color=lime> $NeutralAS2
<td style=padding-left:15px><font color=#86b2ba> Anacade Settlement : <td><font color=lime> $NeutralBS2 <p>";

echo "<tr><td>";
echo "<tr><td>";
echo "<tr><td>";
echo "<tr><td>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Crag Mine : <td><font color=lime> $resources <br>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Ether : <td><font color=lime> $Platform01 <br>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Sette Dessert : <td><font color=lime> $Sette <br>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Cauldron Vulcanic : <td><font color=lime> $Cauldron01 <br>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Elan :<td><font color=lime> $Elan <br>";
echo "<tr><td><td><td style=padding-left:15px><font color=#ffffff> Dungeon : <td><font color=lime> $Dungeon00 <p>";

?>
 
Upvote 0
put it in your root folder, just like a gamecp or web page files, and dont forget to put .php extension in the file when you save it.
 
Upvote 0
PHP:
<?php
$conf_gmt=0; //Correction for GMT, the time when the web server is different from time to time on the game server. If time is the same - specify 0
$conf_ygmt=2; //YOUR GMT zone. Ukraine +2, Russia +3

$conf_cw1=5; //1st CW
$conf_cw2=13; //2nd CW
$conf_cw3=21; //3rd CW

$h=Date(H);
$datem=date(i);
$h=$h+$conf_gmt;

if ($h>=25) {
$h=$h-24;
}
if($h < $conf_cw2 && $h >= $conf_cw1)
{ $hh=2;$hc=$conf_cw2; }
if($h >= $conf_cw2 && $h < $conf_cw3)
{ $hh=3;$hc=$conf_cw3; }
if($h >= $conf_cw3 && $h <= 23)
{ $hh=1;$hc=$conf_cw1; }
if($h >= 00 && $h < $conf_cw1)
{ $hh=1;$hc=$conf_cw1; }
if($h >= $conf_cw1 && $h <= $conf_cw2)
{ $hh=2;$hc=$conf_cw2; }
if ($h==24)
{ $hh=1;$hc=$conf_cw1; }
if ($h==0)
{ $hh=1;$hc=$conf_cw1; }
 
$inh=($hc-$h)-2;
$inm=60-$datem;

$chipwar1="<div>".$hh." ChipWar at ".$hc.":00<br>";
$chipwar3="Time left: ".$inh.":".$inm."<br>Server time: ".$h.":".$datem."<br>(GMT +".$conf_ygmt.")<br><br>".$conf_cw1.":00 - ".$conf_cw2.":00 - ".$conf_cw3.":00</div>";

$chipwar=$chipwar1.$chipwar3;

echo $chipwar;
?>

try this one
 
Upvote 0
I wish i could put this scrip on my page, when some one join to my page ( they see the status ), some one could help me with that ? thanks.
 
Upvote 0
I wish i could put this scrip on my page, when some one join to my page ( they see the status ), some one could help me with that ? thanks.



read what fyurith said at the top... just copy it and ssave it with exention of .php then put it to your webfiles..
 
Upvote 0
Ok I'm running xampp really new to .php stuff anyone have a simple guide where to put it ?

OK found the php area in xampp... so I that this php and paste it to notepad ?
 
Upvote 0
Ok I'm running xampp really new to .php stuff anyone have a simple guide where to put it ?

OK found the php area in xampp... so I that this php and paste it to notepad ?



noo.. you suppose to save it into your web server inside of rfclient_update.. here what you do.. copy one php file in ur webserver example register.php then copy it then put it in your desktop ... open it ctrl A then put the Scripts... then after that save it change the name to what it is.. then put it to your rfclient_update...
 
Upvote 0
well.. havent try it but yea i think so it might work... which script do you wanted to put ? the player online or the CW? message me ... ill help you..
 
Upvote 0
I pm'ed you Marnkx! Thanks for all the help guys!

Would like to thank Marnkx123 for assisting me in teamviewer even tho we didn't figure it out! Anyone know xampp?
 
Upvote 0
read what fyurith said at the top... just copy it and ssave it with exention of .php then put it to your webfiles..

Check how its looks, but i want to put it as script in the page : , that when every one join to my page they can see it, thanks.

My server its 2.2.3.2
 
Upvote 0
Thanks, but i want that my CW status show it on my webpage, likes this

Depending on which you actually mean changes which way to do it.
If it's an actual website, use iFrames to make it like that.

if it's actually 'forums' you call your website, create a widget (or whatever the forums type you're using calls it) and then call the php file inside that widget

Sorry, don't mean to come across like a 'know-it-all' but quite a few people just call their forums their websites and it's not quite the same thing
 
Upvote 0
Well I have a main page and a forums but can't figure out xampp, appserver is so much easier!

thought you just needed the php scripts?

unless your webserver isn't working at all.
If it is, you are way over-thinking the issue and most likely just confusing yourself.

make a file, call it "test.php"

inside put this:

Code:
<?php   

echo "test crap";
?>

save it, put it in your home folder for the webserver

go to a browser
go to http://<your ip address>/test.php
ex:

see if it comes up
if it does, rename test.php to whatever else you want, paste in their codes for stats or whatever, and you're done

if it doesn't come up, then you have something else going on
 
Upvote 0
Status
Not open for further replies.
Back