make win-clock fit with servertime. how?
HiHo to all!
Im a mmog-(massively multiplayer online game) player.
A very important part of this games is exact timing when sending an army or anything like this. Now my question:
Is it possible to write a program which either makes the windowsclock show exactly the same time like the server (where the game is on) or to have a seperate program with a clock which shows the exact servertime?
Until now i just know the IP of the server. What else is needed?
Could anyone of you write such a program or advise me how to do so? I only got little experience with delphi 6, but thats a little old...
If you dont understand anything ask me.
Thanks for all! :D
PS: Excuse my english, its not my native language.
[772 byte] By [
warehunter] at [2007-11-19 15:22:21]

# 1 Re: make win-clock fit with servertime. how?
What kind of server and what OS does the server run?
Also what is your primary language? Many of us here are bilingual.
# 2 Re: make win-clock fit with servertime. how?
The server runs with linux.
Its an rootserver. Someone told me its an 'apache server' what ever this means.
btw: My native language is german.
# 3 Re: make win-clock fit with servertime. how?
Okay, being Apache (http://www.apache.org/), your life just became insanely simple. As long as you have PHP installed you can get the time very simply. Apache (http://www.apache.org/) is a webserver and you can find the time wildcards here (http://us2.php.net/manual/en/function.date.php).
echo $date('h:i a'); // will output something like 7:53 am
# 4 Re: make win-clock fit with servertime. how?
very great,
but i dont have an idea if i have php installed or how to install it.
how can i find out?
my second problem is:
even if you gave me the programcode i have to use, i dont know how to write a program with it, that updates the time every second or shows me an (erhhm dont know how to express it) 'moving clock', i mean a clock that is always showing the actual time. i need a clock that updates the time on its own without me klicking a button or so...
# 5 Re: make win-clock fit with servertime. how?
You can find out if PHP is installed by simply running this off of the Apache web server. Write this to a text document and name it "index.php." Put it in a folder on the web server and load it. If you need help with this you will have to talk to the techs.
<?php phpinfo(); ?>
Here is the deal. I can write you a Visual Basic EXE that will utilize this PHP script to read the time. It will simply output the time to the EXE. Will that work?
# 6 Re: make win-clock fit with servertime. how?
so if i would run the .EXE it shows me the time and keeps it up to date until i end? or only shows the time for the moment when i push the button/run the .EXE ?
I would say we try it, if its not to much work for you.
maybe for better understanding:
the url of the game is: www.castelattack.de
there the time is only shown when you refresh the site, but i need a clock that constantly goes on counting the time (in an extra window or so) but still keeps the time, shown in the program, at exctly the same time like the servertime.
maybe now u understand better.
Thanks for your fast help. Very great.
# 7 Re: make win-clock fit with servertime. how?
I could make you an application that would pick up the server time and display it the whole time the application was running. You would just have to run the time EXE and end the time EXE when you wanted to.
It would not be hard to write, nor time consuming.
P.S. I am German but my family has been in the United States for generations so I know very little German. Ich spreche Englisch und Spanischen.
# 8 Re: make win-clock fit with servertime. how?
Its 'Spanisch' without 'en' but veeery good. The rest is perfect german. Respect!!
I think thats exactly the programm I need. It would be very kind of you if you could write it for me.
I think im falling in love with this forum-community a bit.
Fastest answers I ever got!
THANK YOU!
# 9 Re: make win-clock fit with servertime. how?
Its 'Spanisch' without 'en' but veeery good. The rest is perfect german. Respect!!
As I said, I speak very little. Thanks for the encouragement though.
I will write that up for you tonight. You will have to put the PHP file on the Apache server somewhere. I will write up some instructions for you also.
# 10 Re: make win-clock fit with servertime. how?
ok thank you!
# 11 Re: make win-clock fit with servertime. how?
Here it is. To install it simply copy and paste it onto your Apache server. edit the path.txt file to the path of where it resides (Not drive letter but HTTP path). Double-click the clock display and it will cycle through 3 modes of display.