devel:httpclient
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:httpclient [2010-01-08 13:07] – made code snippets work kazmiya | devel:httpclient [2023-09-16 00:53] (current) – Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== HTTPClient Library ====== | ====== HTTPClient Library ====== | ||
- | DokuWiki provides a library to access remote web servers without the need for any special PHP library (like CURL) or unsafe PHP settings (lik allow_url_fopen). | + | DokuWiki provides a library to access remote web servers without the need for any special PHP library (like CURL) or unsafe PHP settings (like '' |
- | Following | + | The following |
* Communication directly via network sockets | * Communication directly via network sockets | ||
* SSL support (if enabled in PHP) | * SSL support (if enabled in PHP) | ||
- | * Configurable | + | * Configurable |
- | * Proxy Support | + | * Proxy support |
* Redirect following | * Redirect following | ||
- | * HTTP Header Parser | + | * HTTP header parser |
- | * Basic Authentication | + | * Basic authentication |
- | * Chunked | + | * Chunked |
- | The client is implemented in the class [[xref> | + | The client is implemented in the class [[xref>dokuwiki\HTTP\HTTPClient]], |
===== Examples ===== | ===== Examples ===== | ||
Line 21: | Line 21: | ||
<code php> | <code php> | ||
- | $http = new DokuHTTPClient(); | + | $http = new dokuwiki\HTTP\DokuHTTPClient(); |
$data = $http-> | $data = $http-> | ||
echo $data; | echo $data; | ||
Line 29: | Line 29: | ||
<code php> | <code php> | ||
+ | use dokuwiki\HTTP\DokuHTTPClient; | ||
+ | |||
// post data can be passed as associative array | // post data can be passed as associative array | ||
- | $send = array( | + | $send = [ |
' | ' | ||
- | ); | + | ]; |
$http = new DokuHTTPClient(); | $http = new DokuHTTPClient(); | ||
$data = $http-> | $data = $http-> | ||
echo $data; | echo $data; | ||
</ | </ |
devel/httpclient.1262952460.txt.gz · Last modified: 2010-01-08 13:07 by kazmiya