snookmz has asked for the wisdom of the Perl Monks concerning the following question:
my ($headers, $body) = ('',''); use WWW::Curl::easy; my $curl = WWW::Curl::easy->new(); my $CURLcode = $curl->setopt(CURLOPT_WRITEFUNCTION, \&callback); $CURLcode = WWW::Curl::easy::setopt($curl, CURLOPT_URL, $broker_ur +l); $CURLcode .= WWW::Curl::easy::setopt($curl, CURLOPT_HEADER,\$heade +rs); $CURLcode .= WWW::Curl::easy::setopt($curl, CURLOPT_POSTFIELDS, $p +ost_vars); $CURLcode .= WWW::Curl::easy::perform($curl); WWW::Curl::easy::cleanup($curl);
sub callback { my ($data,$pointer)=@_; $params{'data'} .= $data; return length($data); }
HTTP/1.1 200 OK Date: Mon, 14 Mar 2005 01:42:55 GMT Server: Apache/2.0.40 (Red Hat Linux) Accept-Ranges: bytes X-Powered-By: PHP/4.2.2 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unwanted output to STDOUT in WWW::Curl::new
by zentara (Cardinal) on Mar 14, 2005 at 12:35 UTC | |
by snookmz (Beadle) on Mar 14, 2005 at 21:44 UTC |