From: David Hutto on
On Mon, Mar 15, 2010 at 5:17 AM, Lester Caine <lester(a)lsces.co.uk> wrote:

> Alex Major wrote:
>
>> I'm currently looking at building a web application, however I've run into
>> an area of development I've not come across before. The web site in its
>> basic form allows users to send cars from a point and then the car will
>> arrive at another point. When the car is set on its way, the start time,
>> travel duration and end time are all known and stored in a MySQL database,
>>
>
> The question HAS to be asked ... how do you know the actual travel time ;)
> I think I would be expecting to have to enter something on arrival ....
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You could judge the ETA if the shipping was tracked through GPS.
From: Jochem Maas on
Op 3/15/10 8:24 AM, Midhun Girish schreef:
> Hi ,
> Just as David Hutto has said,What you need is the cronjob... Make a script
> say "check.php" which checks the db to see if any new entries are made...
> and if yes send the mail ...
>
> now using the cronjob feature in linux os(which will be provided as a
> service in your linux hosting cpanel), set a cronjob which calls the "
> http://www.yoursite.com/check.php" URL every minute.... now a trigger will
> be there every minute to the script and the emails will be send irrespective
> of whether anyone is browsing the site or not.... hope it is clear...
>

use cron - yes
have cron call a web URL - no, instead just call the script via the php CLI sapi,
e.g. a cmdline as follows in cron:

/usr/env php /path/to/your/check.php &> /dev/null
From: David Hutto on
On Mon, Mar 15, 2010 at 7:31 AM, Jochem Maas <jochem(a)iamjochem.com> wrote:

> Op 3/15/10 8:24 AM, Midhun Girish schreef:
> > Hi ,
> > Just as David Hutto has said,What you need is the cronjob... Make a
> script
> > say "check.php" which checks the db to see if any new entries are made...
> > and if yes send the mail ...
> >
> > now using the cronjob feature in linux os(which will be provided as a
> > service in your linux hosting cpanel), set a cronjob which calls the "
> > http://www.yoursite.com/check.php" URL every minute.... now a trigger
> will
> > be there every minute to the script and the emails will be send
> irrespective
> > of whether anyone is browsing the site or not.... hope it is clear...
> >
>
> use cron - yes
> have cron call a web URL - no, instead just call the script via the php CLI
> sapi,
> e.g. a cmdline as follows in cron:
>
> /usr/env php /path/to/your/check.php &> /dev/null
>


I do believe removing the /dev/null will send error messages during the
building of the script, correct?
From: Rene Veerman on
+1..

Assuming you have had a 100% success rate of getting cars to their
destination on time for years;

If for some reason you can't set up a cron job, you _could_ have a
browser do the cron-ing for you; a page with an ajax script that kicks
off the check-for-recent-events script on the server.
granularity in milliseconds :)
if you have a windowing system on the server, you can run that browser
script on the server ;)

But if i were boss of such an operation, i'd have all cars outfitted
with gps, and have the gps monitoring app call up urls on my server to
indicate car status & location.
i agree this could be non-trivial, as something has to compare car
location gps coordinates to dropoff location coordinates, and if there
are many cars on the road, it's less than ideal to have the php server
do all the coordinate checking.
But there would be many benefits to a gps installation (with a "panic"
and "car-trouble" button in the vehicle).

RFID tags also might be a solution, one that could cost less to
install and operate.

On Mon, Mar 15, 2010 at 10:17 AM, Lester Caine <lester(a)lsces.co.uk> wrote:
> Alex Major wrote:
>>
>> I'm currently looking at building a web application, however I've run into
>> an area of development I've not come across before. The web site in its
>> basic form allows users to send cars from a point and then the car will
>> arrive at another point. When the car is set on its way, the start time,
>> travel duration and end time are all known and stored in a MySQL database,
>
> The question HAS to be asked ... how do you know the actual travel time ;)
> I think I would be expecting to have to enter something on arrival ....
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
From: Jochem Maas on
Op 3/15/10 12:00 PM, David Hutto schreef:
> On Mon, Mar 15, 2010 at 7:31 AM, Jochem Maas <jochem(a)iamjochem.com> wrote:
>
>> Op 3/15/10 8:24 AM, Midhun Girish schreef:
>>> Hi ,
>>> Just as David Hutto has said,What you need is the cronjob... Make a
>> script
>>> say "check.php" which checks the db to see if any new entries are made...
>>> and if yes send the mail ...
>>>
>>> now using the cronjob feature in linux os(which will be provided as a
>>> service in your linux hosting cpanel), set a cronjob which calls the "
>>> http://www.yoursite.com/check.php" URL every minute.... now a trigger
>> will
>>> be there every minute to the script and the emails will be send
>> irrespective
>>> of whether anyone is browsing the site or not.... hope it is clear...
>>>
>>
>> use cron - yes
>> have cron call a web URL - no, instead just call the script via the php CLI
>> sapi,
>> e.g. a cmdline as follows in cron:
>>
>> /usr/env php /path/to/your/check.php &> /dev/null
>>
>
>
> I do believe removing the /dev/null will send error messages during the
> building of the script, correct?
>

the '&> /dev/null' redirects all output - I kind of make the assumption that the
script would be logging stuff to a file or something when in production.

so, yes, remove the redirection when your developing/testing the script.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Splitting a string ...
Next: ldap_bind() connectivity