Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: akent20000926

Message # 1012274:
Date: 07/11/02 03:52
By: gordon
Subject: RE: scheduling a php script on a web server

Don't forget the humble html refresh function, which can be used to rerun a certain script every x seconds as long as the window is open on the end user's browser. microtime() tends to only be useful in actually recording times, not running script events as you have to revert to long empty for loops (sooooo slow - you don't want that slowing down your server!).

<?php
// refresh this php page every 60 seconds

echo "<meta http-equiv=\"refresh\" content=\"60\">";
?>

Of course not relevent on the command line because it is client side - for that I guess you're better off using windows task scheduler or cron on a unix box to execute 'php scriptname.php' every hour or something.

i'm liking the ability to grab certain things from webpages via fsocketopen() and emailing myself every time the page changes on certain intervals.. I've never learned a full C language or anything like that properly but i'm learning you can do a lot with PHP !

Previous Message | Next Message


Comments:
RE: PHP is slower than HTMLMalph03/27/04 01:42
no bcsub?zariok01/08/03 16:54
about phpdimas yurisdiansyah08/07/02 02:41
RE: scheduling a php script on a web servergordon07/11/02 03:52
this might be easierJason E. Sweat06/17/02 17:17
CPU execution timeMarcel Schiffer06/10/02 05:08
TimerMojgan05/27/02 06:19
RE: scheduling - the easy wayNkm05/15/02 22:54
RE: scheduling - the easy wayKerry Slavin04/11/02 00:52
RE: scheduling - the easy wayGlen Hassell04/10/02 07:51
RE: scheduling a php script on a web serverNkm04/05/02 20:08
scheduling a php script on a web serverAlain04/05/02 11:14
RE: PHP is slower than HTMLWill V.03/26/02 22:21
RE: PHP is slower than HTMLBerge Schwebs Bjørlo01/26/02 08:48
RE: help:Fatal error: Call to undefined function:em1x01/18/02 03:31
PHP is slower than HTMLPeter11/28/01 00:08
total time vs. time used to process scriptbart ogryczak11/16/01 11:08
RE: Why don't you simply add the two numbers??Benoit10/04/01 10:25
help:Fatal error: Call to undefined function:sprming05/09/01 18:10
RE: date functionjellings11/02/00 15:12
Why don't you simply add the two numbers??Mac Wang10/25/00 01:23
date functionPrem Kumar10/24/00 03:23
more timing functions here :philip olson10/06/00 22:48
Providing article code as seperate text filegh (they wanted it longer, so here goes)10/03/00 23:59
RE: time difference from server to servergh (they wanted it longer, so here goes)10/03/00 23:52
time difference from server to serverjaydj10/03/00 05:44
RE: bcsub vs roundVladimir Shapiro10/03/00 04:28
RE: databaseVladimir Shapiro10/03/00 04:21
just in time!Oliwier Ptak10/02/00 18:22
bcsub vs roundDouglas E. Warner09/30/00 11:21
Warning: short excecution timesUlf Wendel09/27/00 10:48
An example from Cold FusionJeremy Bailey09/27/00 08:31
databaseUioreanu Calin09/27/00 07:42
databaseUioreanu Calin09/27/00 06:44
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.