TechniqueUse the following code: <?php // Initialize $conn = new Net_Curl('http://qa.php.net/'); if (Net_Curl::isError($conn)) { die(sprintf('Error [%d]: %s', $conn->getCode(), $conn->getMessage())); } // Set transfer options $conn->proxyUser = 'sterling'; $conn->proxyPassword = 'secret'; // Execute transfer $data = $conn->execute(); if (Net_Curl::isError($data)) { die(sprintf('Error [%d]: %s', $data->getCode(), $data->getMessage())); } print "The results of your transfer were: \n<br>\n"; print $data; ?> CommentsIf you need to interact with a proxy server to fetch a URL with the Net_Curl class, set the proxyUser and proxyPassword properties to appropriate values and execute the transfer. |