cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: PERL libcurl html into variable

From: Charles <sanders-consulting_at_comcast.net>
Date: Wed, 9 Jul 2003 17:16:36 -0700

Search $html for "\r\n\r\n", what seperates header from content. I havent
tested this and havent used perl in a while but

$html =~ s!(.*?)\r\n\r\n!!;

Charles
----- Original Message -----
From: <maarten_at_datastorm.nl>
To: <curl-library_at_lists.sourceforge.net>
Sent: Wednesday, July 09, 2003 3:04 PM
Subject: PERL libcurl html into variable

> Hey all,
>
> I have a perl script doing something like this:
> $html=`curl -K config/stap1.cfg $proxy`;
> the outcome of curl can be found in the variable $html
> No output to the screen!
>
> Now I want to replace the backticks stuff bij using libcurl.
>
> But how do I get the same result, get the html data into $html.
> But without: HTTP/1.1 200 OK
> Date: Wed, 09 Jul 2003 21:52:51 GMT
> Server: Apache/1.3.22 (Unix) (Red-Hat/Linux)
Chili!Soft-ASP/3.6.2 mod_perl/1.24_01 PHP/4.2.2 FrontPage/5.0.2
mod_ssl/2.8.5 OpenSSL/0.9.6b
> Last-Modified: Tue, 24 Sep 2002 14:08:07 GMT
> ETag: "3ed848-123-3d9071c7"
> Accept-Ranges: bytes
> Content-Length: 291
> Content-Type: text/html
>
> I only need the html content back into the $html.
>
> How can I do that?
>
> Maarten_at_datastorm.nl
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps
>

-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Received on 2003-07-10

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET