if (isset($_REQUEST['url']) && ($_REQUEST['url'] != 'http://') ) {
$http_req = new HTTPRequest($_REQUEST['url'], array());
- if ($content = $http_req->DownloadToString()) {
+ $content = $http_req->DownloadToString();
+ if (!$http_req->_errno && $content) {
$filename = substr(time(), -6). '.zip';
$full_filename = TR_CONTENT_DIR . $filename;
var $_uri; // request URI
var $_port; // port
var $_cookies = array(); // array of cookies
- var $_errstr;
- var $_errno;
+ var $_errstr = '';
+ var $_errno = 0;
// scan url
function _scan_url()
}
} catch (Exception $exception) {
$this->_errstr = $exception->getMessage();
- $this->_errno = $exception->getCode();
+ $this->_errno = $exception->getCode();
return(FALSE);
}
}