Re: PHP images and time



On Jul 18, 11:49 am, Maureeze <maure...@xxxxxxxxx> wrote:
Hello there,

I want to add a php script to my page that changes my collection of
images based on the time of my computer. So, every 5 seconds i want to
change the picture on the site, but it should not be random. It should
be based on time, so to put it simply: I want to see the same picture
at 12:00 noon every day and the same picture at 16:00. Is this
possible with PHP or should i use something else..

Thank you sooooo much.

Kind regards,

Maurice

Not too hard, you need to take the time usingf date("G") (hour from 24
hour clock, add i for minutes) and divide by how many images you want
to display, and then use that result to build your filename for your
img tag on your page.

Now this is only for server time, getting the time from a client
machine is I think virtually impossible (without some sort of client-
side script).

.



Relevant Pages

  • PHP images and time
    ... I want to add a php script to my page that changes my collection of ... images based on the time of my computer. ... change the picture on the site, but it should not be random. ... Kind regards, ...
    (php.general)
  • Show image img src=img.php?img=1.jpg help
    ... I am trying to show images using php script, it works fine, pictures ... but if i right click on it and choose "save picture as" it offers me to ... not jpeg the picture actually is:( ...
    (comp.lang.php)
  • Re: Problem displaying web pages
    ... Compress graphics file sizes to create smaller Publisher Web ... You add it to the picture toolbar after installing the SP. ... rendering two different versions of both your company logo and the ... viewing this site in publisher the images are good quality. ...
    (microsoft.public.publisher.webdesign)
  • Re: How can I hyperlink to an enlarged picture in Publisher 2003?
    ... I was referencing the way you produce your html ... One of the places where Publisher starts to feel its limits is when the ... When you resize and optimize your images, ... Picture> Size tab). ...
    (microsoft.public.publisher.webdesign)
  • Re: How do I create mouse overs for web documents?
    ... I did tweak the sky and the picture is a LITTLE bit clearer. ... Many thanks David. ... > you can see that you have added the alt tags to your images as they load ... and to get the alt tags to work in Pub 2003 requires ...
    (microsoft.public.publisher.webdesign)