Wrapper for various HTTP utilities.
More...
|
| mime ($file) |
|
| acceptable ($list=NULL) |
|
| send ($file, $mime=NULL, $kbps=0, $force=TRUE) |
|
| receive ($func=NULL, $overwrite=FALSE, $slug=TRUE) |
|
| progress ($id) |
|
| engine ($arg='curl') |
|
| subst (array &$old, $new) |
|
| request ($url, array $options=NULL) |
|
| minify ($files, $mime=NULL, $header=TRUE, $path='') |
|
| rss ($url, $max=10, $tags=NULL) |
|
| whois ($addr, $server='whois.internic.net') |
|
| slug ($text) |
|
| filler ($count=1, $max=20, $std=TRUE) |
|
Wrapper for various HTTP utilities.
Web::_curl |
( |
|
$url, |
|
|
|
$options |
|
) |
| |
|
protected |
HTTP request via cURL
- Returns
- array
- Parameters
-
Web::_socket |
( |
|
$url, |
|
|
|
$options |
|
) |
| |
|
protected |
HTTP request via low-level TCP/IP socket
- Returns
- array
- Parameters
-
Web::_stream |
( |
|
$url, |
|
|
|
$options |
|
) |
| |
|
protected |
HTTP request via PHP stream wrapper
- Returns
- array
- Parameters
-
Web::acceptable |
( |
|
$list = NULL ) | |
|
Return the MIME types stated in the HTTP Accept header as an array; If a list of MIME types is specified, return the best match; or FALSE if none found
- Returns
- array|string|FALSE
- Parameters
-
Web::engine |
( |
|
$arg = 'curl' ) | |
|
Specify the HTTP request engine to use; If not available, fall back to an applicable substitute
- Returns
- string
- Parameters
-
Web::filler |
( |
|
$count = 1 , |
|
|
|
$max = 20 , |
|
|
|
$std = TRUE |
|
) |
| |
Return chunk of text from standard Lorem Ipsum passage
- Returns
- string
- Parameters
-
$count | int |
$max | int |
$std | bool |
Detect MIME type using file extension
- Returns
- string
- Parameters
-
Web::minify |
( |
|
$files, |
|
|
|
$mime = NULL , |
|
|
|
$header = TRUE , |
|
|
|
$path = '' |
|
) |
| |
Strip Javascript/CSS files of extraneous whitespaces and comments; Return combined output as a minified string
- Returns
- string
- Parameters
-
$files | string|array |
$mime | string |
$header | bool |
$path | string |
Return upload progress in bytes, FALSE on failure
- Returns
- int|FALSE
- Parameters
-
Web::receive |
( |
|
$func = NULL , |
|
|
|
$overwrite = FALSE , |
|
|
|
$slug = TRUE |
|
) |
| |
Receive file(s) from HTTP client
- Returns
- array|bool
- Parameters
-
$func | callback |
$overwrite | bool |
$slug | bool |
Web::request |
( |
|
$url, |
|
|
array |
$options = NULL |
|
) |
| |
Web::rss |
( |
|
$url, |
|
|
|
$max = 10 , |
|
|
|
$tags = NULL |
|
) |
| |
Retrieve RSS feed and return as an array
- Returns
- array|FALSE
- Parameters
-
$url | string |
$max | int |
$tags | string |
Web::send |
( |
|
$file, |
|
|
|
$mime = NULL , |
|
|
|
$kbps = 0 , |
|
|
|
$force = TRUE |
|
) |
| |
Transmit file to HTTP client; Return file size if successful, FALSE otherwise
- Returns
- int|FALSE
- Parameters
-
$file | string |
$mime | string |
$kbps | int |
$force | bool |
Return a URL/filesystem-friendly version of string
- Returns
- string
- Parameters
-
Web::subst |
( |
array & |
$old, |
|
|
|
$new |
|
) |
| |
Replace old headers with new elements
- Returns
- NULL
- Parameters
-
$old | array |
$new | string|array |
Web::whois |
( |
|
$addr, |
|
|
|
$server = 'whois.internic.net' |
|
) |
| |
Retrieve information from whois server
- Returns
- string|FALSE
- Parameters
-
$addr | string |
$server | string |
The documentation for this class was generated from the following file: