TechniqueSet the $progress , $mute , and $verbose properties in the Net_Curl class: <?php //Initialize the CURL transfer $conn = new Net_Curl('http://www.webtechniques.com/'); if (Net_Curl::isError($conn)) { die(sprintf('Error [%d]: %s', $conn->getCode(), $conn->getMessage())); } // Set transfer options $conn->verbose = 1; $conn->progress = 1; $conn->mute = 0; // Execute the 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; ?> CommentsSetting the verbose and progress properties to nonfalse values tells PHP to report all its actions to STDERR (the standard error stream). Setting the mute property to tells PHP not to suppress any warnings or errors. If you want PHP to fail when a bad error code (< 300) is returned from a Web site, set the fail property to a nonfalse value: <?php $conn = new Net_Curl('http://www.mcp.com/index.cfm'); if (Net_Curl::isError($conn)) { die(sprintf('Error [%d]: %s', $conn->getCode(), $conn->getMessage())); } $conn->fail = true; $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; ?> |