Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old April 26th, 2002, 06:31 PM
Grafix.Hound Grafix.Hound is offline
Xtreme F.o.X. Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Canada
Posts: 4 Grafix.Hound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
retrieving & printing time from server???

I'm having somewhat of a dilema in writing a php4 script that can retrieve the time from the server and print it on the clients machine. I also would like to know how I can have it read the clients system time and print it to the client.

here's what I've gotten so far:

<?php
echo date("h : i : s a");
?>

At the moment it's reading a time that doesn't even come close to reflecting my servers time.

I would greatly appreciate any help you could share with me.

Last edited by Grafix.Hound : April 27th, 2002 at 03:36 PM.

Reply With Quote
  #2  
Old April 26th, 2002, 09:10 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
Check out date() and about refreshing - describe in more details why you want to do that.
__________________
And you know I mean that.

Reply With Quote
  #3  
Old April 26th, 2002, 09:36 PM
Grafix.Hound Grafix.Hound is offline
Xtreme F.o.X. Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Canada
Posts: 4 Grafix.Hound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanx for the tip AlCapone.

The reason I wanted it to refresh itself has gone out the door... I'm working on the script for a friend of mine and it appears he wasn't too conerned about whether or not it refreshed or not so it's not all that important now. I'm just left with figuring out how to get it to read the clients time instead of the servers.

Reply With Quote
  #4  
Old April 27th, 2002, 11:19 AM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
>>get it to read the clients time instead of the servers
use javascript for that.

Reply With Quote
  #5  
Old April 27th, 2002, 03:24 PM
Grafix.Hound Grafix.Hound is offline
Xtreme F.o.X. Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Canada
Posts: 4 Grafix.Hound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
So Are you suggesting I strictly use JavaScript or in conjuntion with PHP? Actually a better question would be would there be any point to using PHP for this task at all?

Thanx again AlCapone!

Reply With Quote
  #6  
Old April 27th, 2002, 03:44 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
You can't get visitor's time with php, so work your way from there.

Reply With Quote
  #7  
Old April 27th, 2002, 04:08 PM
Grafix.Hound Grafix.Hound is offline
Xtreme F.o.X. Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Canada
Posts: 4 Grafix.Hound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yeah, thanx I came to that conclusion not long after reading your previous post... I just had to let it sink in before it struck me.

I'm slowly coming to understand the principles and limitations behind PHP. For my friends needs all he's going to require is a simple JavaScript.

Thanx a lot for your assistance AlCapone

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > retrieving & printing time from server???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway