asynchronous PHP




The server I'm working on right now allows PHP scripts to run for 300 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.

I thought maybe I could get around the time limit by having the first script call other scripts, like this:

shell_exec("callGoogle1.php");
shell_exec("callGoogle2.php");
shell_exec("callGoogle3.php");
shell_exec("callGoogle4.php");
shell_exec("callGoogle5.php");


But the first PHP scripts waits for shell_exec() to return before making the next call. So how do I break out of the procedural, step-by-step approach that PHP takes? Is there a correct way to do this?

(My other option is to maybe write a macro for FireFox so that the browser on my home machine fires off a bunch of AJAX requests to PHP scripts that are on my server, but that seems like a hell of a hack, and quite fragile too.)
.



Relevant Pages

  • Re: Interesting webserver intrusion (apache 1.3.31, mod_ssl 2.8.18, php 4.3.7)
    ... since they managed to execute commands via Apache. ... and 30 minutes before one of the scripts was uploaded. ... Sounds like one of the many PHP scripts is exploitable. ... this means that the exploit would allow the attacker to run ...
    (Incidents)
  • Re: asynchronous PHP
    ... The server I'm working on right now allows PHP scripts to run for 300 ... a ping from my ISP's server took about 0.2 seconds on average. ...
    (comp.lang.php)
  • Re: PHP Encoders
    ... with the encrypted scripts onto the server to make the scripts ... even faster than unencrypted PHP scripts. ... The ioncube encoder starts at ...
    (php.general)
  • Re: PHP Encoders
    ... with the encrypted scripts onto the server to make the scripts ... even faster than unencrypted PHP scripts. ... The ioncube encoder starts at ...
    (alt.php)
  • Re: PHP Encoders
    ... with the encrypted scripts onto the server to make the scripts ... even faster than unencrypted PHP scripts. ... The ioncube encoder starts at ...
    (comp.lang.php)