状态 草稿
Todo Proof read
官方最后更新时间 2008/08/29 04:55

Remote Helper

A helper designed to retrieve remote url and file status.

Methods

Status

status($url) returns the HTTP status code of the given URL. It takes:

  • [string] $url the address you want to get the status of
  • returns [string|bool] the status code if it exists or FALSE

Example

echo remote::status('http://www.kohanaphp.com');
echo remote::status('http://trac.kohanaphp.com');
echo remote::status('http://dev.kohanaphp.com');
echo remote::status('http://www.kohanaphp.com/idontexist');

It will result in:

302 // Found
301 // Moved Permanently
200 // OK
404 // File Not Found
helpers/remote.txt · 最后更改: 2008/09/01 03:56 由 admin