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

curl-and-php

ISA Server

From: Raluca Oprean <Raluca_at_sds.ro>
Date: Wed, 17 Aug 2005 10:23:27 +0300

HI!
 
I've managed to enable curl on localhost on a Apache server. The trouble
is now that my computer is part of a domain and to get to the internet I
have to pass through an ISA Server authentification ... how do I do
that?
I've tried this code:
 
<?php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, "http://www.sds.ro/");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_PROXY, "server:8080");
curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "usr:pass");
$result = curl_exec($ch);
echo "Error number: ".curl_errno($ch)."\n";
echo "Error message: ".curl_error($ch)."\n";
echo "Result: ".strlen($result)." bytes\n";
echo $result;
print_r(curl_getinfo($ch));
?>
 
The error I receive is this:
 
HTTP 407 Proxy Authentication Required - The ISA Server requires
authorization to fulfill the request. Access to the Web Proxy service is
denied. (12209)
Internet Security and Acceleration Server
 
Raluca Oprean
programmer
Segas Data System
0727359532
 
Received on 2005-08-17