RE: Execute script and redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That was a smart solution. However, my client have not given me access to
the MySQL database at this stage (just doing a small side project of the
clients web site). If you could not take advantage of database and cron job,
what would you do?

PS! I am not sure that my clients host supports cron jobs  DS!



-----Original Message-----
From: Richard Lynch [mailto:ceo@xxxxxxxxx] 
Sent: Thursday, April 20, 2006 2:57 PM
To: Peter Lauri
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Execute script and redirect

On Thu, April 20, 2006 2:23 am, Peter Lauri wrote:
> 1.	Fill out form and click submit
> 2.	Script validates data
> 3.	Data is being sent to external source via Web Service
> 4.	A file is being downloaded (redirects to files location)
>
> The problem is that #3 is taking around 15 seconds to complete because
> the
> Web Service is very slow. I would like to run #3 in the background and
> directly jump to #4.
>
> Is this possible?

There's possible, and then there's possible...

How about this:

The BEST solution would be to insert the [valid/clean] data into a
database, and run a cron job to send off everything to the Web
Service.

You'll have to mark what's sent and what isn't and be careful not to
run two jobs at once when it's really slow (sending duplicate data)
nor to "skip" data that didn't safely get sent.

But should do all that anyway in your script.

There might even be functions in the Web Service to make it easy for
you to send a whole BUNCH of records at once, saving a lot of time on
your end.

And, for sure, if all your script has to do is insert to a database
table for step 3, it's gonna be pretty fast.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux