Click to See Complete Forum and Search --> : make win-clock fit with servertime. how?
warehunter
November 10th, 2005, 01:06 PM
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.
PeejAvery
November 10th, 2005, 01:39 PM
What kind of server and what OS does the server run?
Also what is your primary language? Many of us here are bilingual.
warehunter
November 10th, 2005, 02:59 PM
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.
PeejAvery
November 10th, 2005, 03:33 PM
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
warehunter
November 10th, 2005, 03:53 PM
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...
PeejAvery
November 10th, 2005, 04:07 PM
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?
warehunter
November 10th, 2005, 04:17 PM
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.
PeejAvery
November 10th, 2005, 04:50 PM
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.
warehunter
November 10th, 2005, 05:12 PM
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!
PeejAvery
November 10th, 2005, 05:25 PM
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.
warehunter
November 10th, 2005, 05:34 PM
ok thank you!
PeejAvery
November 11th, 2005, 01:33 AM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.