Forum Moderators: coopster

Message Too Old, No Replies

Limiting the download size of a cURL request?

How would I stop a transfer after X bytes?

         

rollinj

2:36 am on Jan 19, 2010 (gmt 0)

10+ Year Member



How would I go about stopping/canceling a PHP cURL transfer after X bytes were received?

Would the CURLOPT_PROGRESSFUNCTION PHP cURL option help me out?

Is there no CURLOPT_MAXDOWNLOADSIZE type of curl option..? :S

rollinj

4:33 am on Jan 19, 2010 (gmt 0)

10+ Year Member



I found one way to do it, with a CURLOPT_RANGE http range header.

However, not all web servers obey the RANGE command. Is there no way to stop it outright?