i could only think of curl_close() from one of the callback functions. but php throws a warning:
PHP Warning: curl_close(): Attempt to close cURL handle from a callback.
any ideas how to do that?
i could only think of curl_close() from one of the callback functions. but php throws a warning:
PHP Warning: curl_close(): Attempt to close cURL handle from a callback.
any ideas how to do that?
If the problem is that is taking too long to execute the curl, you could set a time, example
you can return false or something what is not length of currently downloaded data from callback function to abort curl
I had a similar problem that needed me to be able to stop a curl transfer in the middle. This is easily in my personal top ten of 'dirty hacks that seem to work' of all time.
Create a curl read function that knows when it's time to cancel the upload.
And tell Curl to stop if the data read rate drops too low for a certain amount of time.
This will cause the curl transfer to abort during the upload. Obviously not ideal but it seems to work.