1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Getting client date/time in php

Discussion in 'PHP' started by fuxia79, Aug 31, 2005.

  1. #1
    Hi all, I am using php with smarty and I display the server time using $smarty.now.
    My question is: is it somewhat possible to get the time of the client instead of getting the server's one? I searched the universe but found no reply!
    Thanks in advance
     
    fuxia79, Aug 31, 2005 IP
  2. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Only if you grab the client's time on browser side using JavaScript, and submit it to your PHP script using, for instance, a hidden form variable.
     
    Willy, Aug 31, 2005 IP
  3. ks.alam28

    ks.alam28 Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    php runs on severside. so there is no way to get client side date and time using direct php functions. u gotta use client side script and convert it into php
     
    ks.alam28, Jul 17, 2009 IP