Edit report at http://bugs.php.net/bug.php?id=54622&edit=1

 ID:                 54622
 Updated by:         pierr...@php.net
 Reported by:        md2k at visp dot net dot lb
 Summary:            cURL speed limit options not implemented till
                     present day.
-Status:             Assigned
+Status:             Closed
 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:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This new feature is now backported in 5.3.7-dev


Previous Comments:
------------------------------------------------------------------------
[2011-04-29 12:41:48] pierr...@php.net

Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&revision=310648
Log: Added support for CURLOPT_MAX_RECV_SPEED_LARGE and
CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815
# MFH. This addition was already committed to trunk and is backported as
requested in #54622

------------------------------------------------------------------------
[2011-04-29 10:06:00] md2k at visp dot net dot lb

Thank you Pierrick. i hope it will be possible to add even to 5.3.

------------------------------------------------------------------------
[2011-04-29 03:45:15] pierr...@php.net

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

Reply via email to