limiting download size using curl



Hi!

I have a server I'd like to download hundreds of pages from, and only
get the first few kilobytes of every page to save resources on both
my
and the remote end. Since the server doesn't support HTTP range to
use it in curl like curl_setopt($ch, CURLOPT_RANGE, "0-5000"); I
started looking around and found that using the custom write function
I might be able to do the same.

As I understand it, closing the handle and thus terminating the
transfer from within the callback function is not possible, so I'm a
bit stuck..

How could I get this done? Could someone paste me a fewliner example?

Thanks in advance
Andrew
.



Relevant Pages

  • limiting download size with curl
    ... I have a server I'd like to download hundreds of pages from, ... get the first few kilobytes of every page to save resources on both my ... transfer from within the callback function is not possible, ...
    (comp.lang.php)
  • limiting transferred data using curl
    ... I have a server I'd like to download hundreds of pages from, ... get the first few kilobytes of every page to save resources on both ... transfer from within the callback function is not possible, ...
    (php.general)
  • RE: Can not view network neighborhood
    ... I am interested in accessing the resources on the ... I need to access SQL server, and a "file share" which are on ... Do I still need to VPN directly to the SBS? ...
    (microsoft.public.windows.server.sbs)
  • Re: [Xen-devel] Re: [ANNOUNCE] Xen high-performance x86 virtualization
    ... >> that each virtual machine only gets the resources that its sponsor ... This allows companies providing virtual servers to ... Ensim's 'private virtual server' product is the most complete ... even in the buffer cache. ...
    (Linux-Kernel)
  • Re: Changing Node & Virtual IPs for Print Server Cluster
    ... It's a clustered print server. ... Cluster Node 1 Name: cluster1a.domain.com ... Move all resources to Node A. ... IP addresses for all virtual servers including the cluster itself. ...
    (microsoft.public.windows.server.clustering)