Re: Limiting speed when using CURL functions
| From: | Manuel Lemos | Date: | Tue, 13 Mar 2007 03:38:04 +0000 |
| Subject: | Re: Limiting speed when using CURL functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250392@lists.php.net to get a copy of this message | ||
Hello,
on 03/12/2007 09:14 AM Tijnema ! said the following:
> Hi,
>
> Is there any way i can limit the transfer speed when using CURL?
>
> I'm uploading a file to a server, and i don't want the script to f*** up
> all
> bandwidth.
This is a an unusual question. I don't know how can you do that with
Curl as it encapsulates the whole request in a single PHP call.
What you may want to try is to look at this HTTP client class. It can
perform regular file upload POST requests reading files on demand. To
slow down uploads, you can insert a few sleep() calls in the file
uploading loop.
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/