Jump to content

How to determine if the script called by curl has already finished executing?


castor_troy

Recommended Posts

I have a script that sends a file to the client's website through ftp_put. This file is then executed on the client's website using curl. Now, how will I know if that file has already done it's part so I can print out a success message or something?

 

here's my sample code:

        ftp_put($fh, '/httpdocs/temp.php', 'temp.php', FTP_ASCII);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, "http://clientdomain.com/temp.php?action=do_something");
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        curl_exec($ch);
        curl_close($ch);

 

TIA :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.