# [PATCH] cURL limiting upload/download speed

- Thread: https://externals.io/message/28370
- Original archive: https://news-web.php.net/php.internals/28370
- Started by Tijnema ! on 2007-03-16T14:27:35+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #28370 — Tijnema ! — 2007-03-16T14:27:35+00:00

URL: https://externals.io/message/28370#28370

Hi,

I've written a small patch so that PHP supports limiting
upload/download speed when using cURL.
The patch is based on PHP-5.2.1, but works also on PHP6 from CVS(Only
differs in offset a little bit) .
What the patch does is adding 2 extra constants for the `curl_setopt()`
function. The new constants are:
 `CURLOPT_MAX_SEND_SPEED_LARGE` and `CURLOPT_MAX_RECV_SPEED_LARGE` 
So these must also be added to the manual if you are going to
implement this patch.

Kind Regards,

Tijnema

---

## #28371 — Edin Kadribasic — 2007-03-16T14:31:02+00:00

URL: https://externals.io/message/28370#28371 · In reply to: #28370

Hi Tijnema,

The mailing lists strips attachment that don't have a correct mime-type.
Could you post your patch somewhere and send the link to the list?

Does this patch require specific cURL version?

Edin


Tijnema ! wrote:
> Hi,
> 
> I've written a small patch so that PHP supports limiting
> upload/download speed when using cURL.
> The patch is based on PHP-5.2.1, but works also on PHP6 from CVS(Only
> differs in offset a little bit) .
> What the patch does is adding 2 extra constants for the `curl_setopt()`
> function. The new constants are:
> `CURLOPT_MAX_SEND_SPEED_LARGE` and `CURLOPT_MAX_RECV_SPEED_LARGE` 
> So these must also be added to the manual if you are going to
> implement this patch.
> 
> Kind Regards,
> 
> Tijnema

---

## #28372 — Tijnema ! — 2007-03-16T14:36:14+00:00

URL: https://externals.io/message/28370#28372 · In reply to: #28371

> Hi Tijnema,
>
> The mailing lists strips attachment that don't have a correct mime-type.
> Could you post your patch somewhere and send the link to the list?
>
> Does this patch require specific cURL version?
>
> Edin

Ok, i uploaded it to rapidshare:
http://rapidshare.com/files/21320376/php-curl-limit-speed.patch

I've written it so that if libcurl version is >= 7.16.0 it enables it,
else it does nothing as this is supported since libcurl 7.16.0

Tijnema

>
>
> Tijnema ! wrote:
> > […]
