You are here: Re: Automated Script « PHP Programming Language « IT news, forums, messages
Re: Automated Script

Posted by Andrew @ Rockface on 11/12/59 11:28

chotiwallah wrote:
> not possible using php only.
>
> three possible ways around:
>
> 1. use some web based cron (can't remember an url at the moment, sorry)
>
> 2. if you have a local pc that's online 24h, have a little program
> there calling the automated script every x seconds
>
> 3. use the most frequented page of your website to call the automated
> script (using a blind image, for instance). you'd have to include a
> timer in the automated script than.

You could use an infinite loop and stick the code to be executed inside
with a sleep at the end.

$x = 5;
while(1) {
echo "Hello world";
sleep($x);
}

Or if you want to re-execute the code a set number of times use:

$x = 5;
$y = 10;
for ($c = 0; $c < $y; $c++) {
echo "Hello world";
sleep(5);
}

--
Andrew @ Rockface
np: Sylvie - Smoke and Mirrors [stopped]
www.rockface-records.co.uk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация