I think with cURL you have to specify the port via curl_setopt(). Also as your sending a username and passed you need to tell cURL. For example:
PHP Code:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://xxx.xxx.xxx.xxx:2083/frontend/x3/index.html"); curl_setopt($ch, CURLOPT_POST, 0); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($ch, CURLOPT_TIMEOUT, 0); // Took out this - I would leave it as default. curl_setopt($ch, CURLOPT_PORT, '2083'); // Added this curl_setopt($ch, CURLOPT_VERBOSE, 1); // Added this curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); // Added this curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); // Added this $view = curl_exec($ch); echo $view; // echo is faster then print. var_dump(curl_getinfo($ch)); // Also added this, it will output the header infomation. curl_close($ch);
__________________
My Blog/Site: Please login or register to view this content. Registration is FREE
Last edited by rogem002; 09-08-2010 at 01:34 PM..
|