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


cURL in PHP behind proxy

From: <>
Date: Tue, 29 Jun 2004 16:40:22 -0500 (CDT)

First off, system is Red Hat 7.2, PHP is 4.3.7, cURL is 7.12.0. This
system is behind a firewall at my place of employment. All external HTTP
goes through a proxy server. I'm trying to collect an RSS file via this
type of script: (some items replaced by xxx)

$ch = curl_init("");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, "");
curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "xxx:xxx");

$x = curl_exec($ch);

print "page:" . htmlentities($x) . curl_error($ch) ;


All that is displayed on the page is:

page:1transfer closed with 1543 bytes remaining to read

Anyone have an idea?
Received on 2004-06-29