Is there such a function?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sleepwalker0
Forum Newbie
Posts: 17
Joined: Sun Feb 19, 2006 4:13 pm

Is there such a function?

Post by sleepwalker0 »

Hey everyone I need to reload a picture (not a page) ever lets say 60 seconds. Don't tell me how to do it cause I really want to try this myself but are there already some php functions like picturereload() or something, so I dont have to do it manually.

So I need two functions:

1 For a picture to reload
2 to do something over and over ever ome time (like interval in js)

Thx
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Load a picture and save it to your server? Or refresh the picture on a page. To do the latter you will need to use javascript, the former a cron job running every 60 seconds. Generally you can read in the binary string for a file with the fopen family of functions
sleepwalker0
Forum Newbie
Posts: 17
Joined: Sun Feb 19, 2006 4:13 pm

Post by sleepwalker0 »

No I don't need to upload a file to my server. It's a hotlink to an ftp, and I was wondering if it's possible to do it with php
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

sleepwalker0 wrote:Hey everyone I need to reload a picture (not a page) ever lets say 60 seconds. Don't tell me how to do it cause I really want to try this myself but are there already some php functions like picturereload() or something, so I dont have to do it manually.

So I need two functions:

1 For a picture to reload
2 to do something over and over ever ome time (like interval in js)

Thx
This is client side, not server side. Would have to use JavaScript (client side).
sleepwalker0
Forum Newbie
Posts: 17
Joined: Sun Feb 19, 2006 4:13 pm

Post by sleepwalker0 »

so it's impossible to do in php? (or almost impossible)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

That doesn't make sense... PHP outputs data, by the time you see your page PHP is done. You can have PHP output javascript.
darkbear
Forum Newbie
Posts: 3
Joined: Sat Mar 18, 2006 8:56 am

Post by darkbear »

You should read sth about Ajax. Its great.
Post Reply