Re: asynchronous PHP



rf wrote:
Lawrence Krubner wrote:
The server I'm working on right now allows PHP scripts to run for 300
seconds.

That's a long time. The out of the box default is 30 seconds.

Sure, but most of the companies I've worked at have used a big number. I haven't yet worked anywhere that left the time limit at the default 30 seconds.


I need to get around that. I'm writing a script that pings
the Google Ajax API. The script is called as a cron job. It needs to
make over 100,000 queries against Google.

Consider set_time_limit.

I don't think there is a value that I could set that could ensure this operation run safely. PHP postpones most memory clean up operations till the script is done running. I'd rather find a way to trigger multiple PHP scripts than try to get one PHP script to do everything that I want.



However don't you think that 100,000 hits against google at once might just be a tad over their TOS limits?

My sense is that most Google mashups make a lot more calls than that. Some of the bigger mashups make several million calls a day. Consider any of these:

http://mashable.com/2008/05/14/17-google-maps-mashups-to-waste-away-your-day/

All the same, I've asked about this issue over on the Google Search API forum.





.



Relevant Pages

  • Re: Some links dont work on the same page .
    ... On Google page. ... Groups, Images, news are php scripts it seems and ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Multi Threaded?
    ... There are some articles flowing around about how Yahoo did it. ... look at google. ... Jochen Daum - Cabletalk Group Ltd. ... PHP DB Edit Toolkit -- PHP scripts for building ...
    (comp.lang.php)
  • Hide email from spammers
    ... This is a total PHP-beginner question... ... Google has found me PHP scripts that could do it, ... with dozens of attributes and parameters to ...
    (comp.lang.php)
  • Re: using the "static" keyword to implement the Singleton pattern
    ... Thank god for Google. ... Jochen Daum - CANS Ltd. ... PHP DB Edit Toolkit -- PHP scripts for building ...
    (comp.lang.php)
  • Re: asynchronous PHP
    ... Lawrence Krubner wrote: ... the Google Ajax API. ... The script is called as a cron job. ... make over 100,000 queries against Google. ...
    (comp.lang.php)