Knowledgebase

Limit PHP Curl download speed

Posted by WebCobra, 02-13-2010, 02:20 AM
Is it possible to limit the php curl speed?

Posted by SlavaT, 02-13-2010, 04:45 AM
As I know there are no parameters in libcurl for limit download speed. You can use CURLOPT_TIMEOUT option to set up the aximum number of seconds to allow cURL functions to execute. For limit download speed you can use sockets function in PHP.

Posted by n3r0x, 02-16-2010, 11:45 PM
Run it in a timed loop.. fetching fragments each time.. count the fragments and size validate against passed time, wait the amount of time left in that second.. This is how most people do it in other languages.. Will work in sockets.. not sure about cUrl



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read


Language:

Client Login

Email

Password

Remember Me

Search