cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

How put flags in PHP format ?

From: Jan Holland <Txp_at_wanadoo.nl>
Date: Fri, 27 Feb 2004 17:34:50 +0100

Browsing in the curl sites I found a long list
of command lines at http://curl.haxx.se/docs/readme.curl.html ...
Examples:

With HTTP 1.1 byte-ranges were introduced.
Using this, a client can request to get only one or more subparts of a
specified document. Curl supports this with the -r flag.

Get the first 100 bytes of a document:
curl -r 0-99 http://www.get.this/
Get the last 500 bytes of a document:
curl -r -500 http://www.get.this/

Suppose I think them interesting,
how do I put the flags"-r" and/or "-500" in
a PHP-command like:

$buffer=curl_exec($ch); ???

I know the possibility of giving commands like
         curl_setopt($ch, CURLOPT_FILE, $fp);
         curl_setopt($ch, CURLOPT_HEADER, 0);
         curl_setopt($ch, CURLOPT_VERBOSE, 1);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
before, but
that's much less elegant then using those flags ....

Anyone any practice ?

Jan Holland

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/03
Received on 2004-02-27