SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi guys,

    Let's say that I've got a very basic html formatted page. And on this page, I want to display the date and time the visitor came to visit the page. Can I use the date function from PHP and just simply rename my original .htm file to .php3 ?

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes.

    You can also do this in js if you don't want to have to use PHP.

  3. #3
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I knew I could do it in JS but I just don't wanna use it so PHP is for me. Thanks !

  4. #4
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ~FYI~ If you have any other questions about PHP, you may want to post in the "Server Side Scripting & Database Development" Forum, which will give you a wider audience for this subject type ~~ WebKat, Senior Advisor
    Dlynn :: SitePoint Senior Advisor ::
    PawPrint Designs by WebKat
    "Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly

  5. #5
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks Webkat !

  6. #6
    SitePoint Enthusiast reachmk's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The thing about using PHP or any server sided language, the date/time function gives the date/time of the Server location and not that of the User's.

    So using Javascript will be good for this purpose.

  7. #7
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh boy, I didn't know that ... Thanks !

  8. #8
    SitePoint Guru Marc's Avatar
    Join Date
    Nov 2000
    Location
    New York
    Posts
    765
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but using javascript just calls the time from the persons cpu clock, and ifs not set right, the site time is wrong.

    i suggest using the date fuction with perl.. although i've never used it in php and don't know how it would work.
    Marc Gugliuzza
    marc.gugliuzza.com




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •