Changeset 11486
- Timestamp:
- 02/19/11 17:03:09 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.9/amp_conf/htdocs/admin/functions.inc.php
r11453 r11486 363 363 function get_headers_assoc($url) { 364 364 $url_info=parse_url($url); 365 $host = isset($url_info['host']) ? $url_info['host'] : ''; 365 366 if (isset($url_info['scheme']) && $url_info['scheme'] == 'https') { 366 367 $port = isset($url_info['port']) ? $url_info['port'] : 443; 367 @$fp=fsockopen('ssl://'.$ url_info['host'], $port, $errno, $errstr, 10);368 @$fp=fsockopen('ssl://'.$host, $port, $errno, $errstr, 10); 368 369 } else { 369 370 $port = isset($url_info['port']) ? $url_info['port'] : 80; 370 @$fp=fsockopen($ url_info['host'], $port, $errno, $errstr, 10);371 @$fp=fsockopen($host, $port, $errno, $errstr, 10); 371 372 } 372 373 if ($fp) { 373 374 stream_set_timeout($fp, 10); 374 $head = "HEAD ".@$url_info['path']."?".@$url_info['query']; 375 $head .= " HTTP/1.0\r\nHost: ".@$url_info['host']."\r\n\r\n"; 375 $query = isset($url_info['query']) ? $url_info['query'] : ''; 376 $head = "HEAD ".@$url_info['path']."?".$query; 377 $head .= " HTTP/1.0\r\nHost: ".$host."\r\n\r\n"; 376 378 fputs($fp, $head); 377 379 while(!feof($fp)) {
