The Daily Click ::. Forums ::. Klik Coding Help ::. Real time clock/ File searching
 

Post Reply  Post Oekaki 
 

Posted By Message

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
17th June, 2008 at 09:52:35 -

Could someone please tell me how to make a clock that is GMT always wherever in the world you are?
Also i would like to know how to make an application to know wether a spesific font is installed or not.

Help would be very appreciated.

 
Professional vaporware developer

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
17th June, 2008 at 12:46:53 -

Well, with the font, you could either use the file extension and check to see if C:\windows\fonts\blahblah.tff (I think that's the font extension) exists, or just have a text file with that font. Take a screenshot of it. Put both on the level, and ask the user if the text's font is the same as the bitmap.

 

  		
  		

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
17th June, 2008 at 14:58:39 -

Thanks! Problem #2 solved.

What about #1? Pretty please someone, i plan to make a "happy hour" in my online game and need to know how to do this!

 
Professional vaporware developer

aphant



Registered
  18/05/2008
Points
  1242
17th June, 2008 at 15:57:54 -

For #1, you could just compare to what the time is on the server's clock. I don't know how you'd do this, though.

 

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
17th June, 2008 at 16:35:16 -

How very informational an enlightening, Adam.

 

  		
  		

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th June, 2008 at 01:53:14 -


Originally Posted by Adam Phant
For #1, you could just compare to what the time is on the server's clock. I don't know how you'd do this, though.


I understood that :/
It's more like: HOW?

 
Professional vaporware developer

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
18th June, 2008 at 04:36:54 -

You need a place to download the time from. I would recommend hosting a simple php page that simply displays the current time when you load the page, then all you would have to do is download the page as a text file and set the current time to the time inside the file.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th June, 2008 at 06:37:49 -

I dont know php...

 
Professional vaporware developer

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
18th June, 2008 at 06:57:28 -

<?php


/**
* Just add this in your page where you
* want the date/time to appear
*
* For more configuration options look
* in the PHP manual at http://uk2.php.net/date
*/
// Displays in the format Saturday, November 22, 2003 11.38

echo date("l, F d, Y h:i" ,time());
?>





 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th June, 2008 at 10:04:34 -

Thanks, but i can't get it to work... If i use html. would it look like this? : <html>
<head>
<title>
<?php

/**
* Just add this in your page where you
* want the date/time to appear
*
* For more configuration options look
* in the PHP manual at http://uk2.php.net/date
*/
// Displays in the format Saturday, November 22, 2003 11.38

echo date("l, F d, Y h:i" ,time());
?>
</title>
</head>
<body>
</body>
</html>

Is there a way to open only the php script?

 
Professional vaporware developer

wizkidweb



Registered
  11/12/2007
Points
  143
18th June, 2008 at 21:30:04 -

Well, you would need a PHP-enabled server to access, and then upload the PHP file onto it (without the html syntax).

Then you would just access that file and determine the date using some extension(forgot which one is best).

 
When you do things right, people won't be sure you've done anything at all.
- God (Futurama)

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
19th June, 2008 at 05:49:24 -

Can someone find a server like that for me?

 
Professional vaporware developer

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
19th June, 2008 at 10:45:11 -

http://answers.yahoo.com/question/index?qid=20070925124459AAPyscQ voila. Freewebs is the easiest site building and hosting place I've found. Good Luck.

 

  		
  		

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
19th June, 2008 at 11:22:57 -

Thank you! I'll try it right away!
Am i dumb or what? Can't get it to work

Image Edited by the Author.

 
Professional vaporware developer

BuddytheRat08



Registered
  23/05/2003
Points
  1
19th June, 2008 at 17:03:04 -

Make sure that the file you are using as the website is a .php file, not a .html file.

If it is .html the server will not understand that it contains php and thus will not read the code properly.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click