Edit report at http://bugs.php.net/bug.php?id=54622&edit=1
ID: 54622
User updated by: md2k at visp dot net dot lb
Reported by: md2k at visp dot net dot lb
Summary: cURL speed limit options not implemented till
present day.
Status: Assigned
Type: Feature/Change Request
Package: cURL related
Operating System: Linux (Gentoo)
PHP Version: 5.3.6
Assigned To: pierrick
Block user comment: N
Private report: N
New Comment:
Thank you Pierrick. i hope it will be possible to add even to 5.3.
Previous Comments:
------------------------------------------------------------------------
[2011-04-29 03:45:15] [email protected]
This feature was added in trunk (5.4). I will double check with the 5.3
Release
master to see if I can add this feature in the current version.
------------------------------------------------------------------------
[2011-04-28 16:17:09] md2k at visp dot net dot lb
i did check current snap php5.3-201104281230, it seems doesn't have this
options
too in cURL interface.
------------------------------------------------------------------------
[2011-04-28 16:13:33] md2k at visp dot net dot lb
Description:
------------
This request related to bug for previous version of PHP
(http://bugs.php.net/bug.php?id=51815), but as i found i have same issue
on php
5.3.6.
Libcurl have options as CURLOPT_MAX_RECV_SPEED_LARGE and
CURLOPT_MAX_SEND_SPEED_LARGE, but seems them didn't work at current
stable
version. to reproduce the problem i use same script as in previous bug
report.
Test script:
---------------
<?php
// create a new cURL resource
$ch = curl_init();
$fh = fopen("out.dat", "w");
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_MAX_RECV_SPEED_LARGE, 10240);
curl_setopt($ch, CURLOPT_URL,
"http://bitcast-a.bitgravity.com/bitgravity/1MB");
curl_setopt($ch, CURLOPT_FILE, $fh);
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
fclose($fh);
?>
Expected result:
----------------
Script should download the link with approximate speed as 10kb/s and
took around
seconds...
Actual result:
--------------
Script download file with full speed which available for my connection,
i.e. no
any rate limit was assigned to curl task.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54622&edit=1