Jump to content

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


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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.