PHP Class Http, thinksns

Mostrar archivo Open project: medz/thinksns-4 Class Usage Examples

Public Methods

Method Description
curl_download ( string $remote, string $local ) : mixed +---------------------------------------------------------- 采集远程文件 +---------------------------------------------------------- +----------------------------------------------------------
download ( string $filename, string $showname = '', string $content = '', integer $expire = 180 ) +---------------------------------------------------------- 下载文件 可以指定下载显示的文件名,并自动发送相应的Header信息 如果指定了content参数,则下载该参数的内容 +----------------------------------------------------------
get_header_info ( $header = '', $echo = true ) : string +---------------------------------------------------------- 显示HTTP Header 信息 +----------------------------------------------------------
send_http_status ( $code ) HTTP Protocol defined status codes

Method Details

curl_download() public static method

+---------------------------------------------------------- 采集远程文件 +---------------------------------------------------------- +----------------------------------------------------------
public static curl_download ( string $remote, string $local ) : mixed
$remote string 远程文件名
$local string 本地保存文件名 +----------------------------------------------------------
return mixed +----------------------------------------------------------

download() public static method

+---------------------------------------------------------- 下载文件 可以指定下载显示的文件名,并自动发送相应的Header信息 如果指定了content参数,则下载该参数的内容 +----------------------------------------------------------
public static download ( string $filename, string $showname = '', string $content = '', integer $expire = 180 )
$filename string 下载文件名
$showname string 下载显示的文件名
$content string 下载的内容
$expire integer 下载内容浏览器缓存时间 +---------------------------------------------------------- +----------------------------------------------------------

get_header_info() public static method

+---------------------------------------------------------- 显示HTTP Header 信息 +----------------------------------------------------------
public static get_header_info ( $header = '', $echo = true ) : string
return string +----------------------------------------------------------

send_http_status() public static method

HTTP Protocol defined status codes
public static send_http_status ( $code )