projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
caeae62
)
- updating docs
author
Michael Wallner
<mike@php.net>
Tue, 22 Mar 2005 14:41:53 +0000
(14:41 +0000)
committer
Michael Wallner
<mike@php.net>
Tue, 22 Mar 2005 14:41:53 +0000
(14:41 +0000)
docs/functions.html
patch
|
blob
|
history
diff --git
a/docs/functions.html
b/docs/functions.html
index 2b0af4c13506ca317e4bd0f982371d64eb4b2e17..dc97a616933126b6666cec23b503dc9e568c6173 100644
(file)
--- a/
docs/functions.html
+++ b/
docs/functions.html
@@
-1,6
+1,3
@@
-Content-type: text/html
-X-Powered-By: PHP/5.0.1
-
<html>
<head>
<title>Function Summary of ext/http</title>
<html>
<head>
<title>Function Summary of ext/http</title>
@@
-226,13
+223,13
@@
See http_get() for a full list of available options.</p>
<p>Generates a form-encoded query string from an associative array or object.</p>
<hr noshade>
<h1>http_methods.c</h1>
<p>Generates a form-encoded query string from an associative array or object.</p>
<hr noshade>
<h1>http_methods.c</h1>
-<h2 id="H
TTPi_Response___construct">void HTTPi_
Response::__construct(bool cache, bool gzip)</h2>
-<p>Instantiates a new H
TTPi_
Response object, which can be used to send<br />
+<h2 id="H
ttpResponse___construct">void Http
Response::__construct(bool cache, bool gzip)</h2>
+<p>Instantiates a new H
ttp
Response object, which can be used to send<br />
any data/resource/file to an HTTP client with caching and multiple<br />
ranges/resuming support.<br />
<br />
NOTE: GZIPping is not implemented yet.</p>
any data/resource/file to an HTTP client with caching and multiple<br />
ranges/resuming support.<br />
<br />
NOTE: GZIPping is not implemented yet.</p>
-<h2 id="H
TTPi_Response_setCache">bool HTTPi_
Response::setCache(bool cache)</h2>
+<h2 id="H
ttpResponse_setCache">bool Http
Response::setCache(bool cache)</h2>
<p>Whether it sould be attempted to cache the entitity.<br />
This will result in necessary caching headers and checks of clients<br />
"If-Modified-Since" and "If-None-Match" headers. If one of those headers<br />
<p>Whether it sould be attempted to cache the entitity.<br />
This will result in necessary caching headers and checks of clients<br />
"If-Modified-Since" and "If-None-Match" headers. If one of those headers<br />
@@
-240,137
+237,143
@@
matches a "304 Not Modified" status code will be issued.<br />
<br />
NOTE: If you're using sessions, be shure that you set session.cache_limiter<br />
to something more appropriate than "no-cache"!</p>
<br />
NOTE: If you're using sessions, be shure that you set session.cache_limiter<br />
to something more appropriate than "no-cache"!</p>
-<h2 id="H
TTPi_Response_getCache">bool HTTPi_
Response::getCache()</h2>
+<h2 id="H
ttpResponse_getCache">bool Http
Response::getCache()</h2>
<p>Get current caching setting.</p>
<p>Get current caching setting.</p>
-<h2 id="H
TTPi_Response_setGzip">bool HTTPi_
Response::setGzip(bool gzip)</h2>
+<h2 id="H
ttpResponse_setGzip">bool Http
Response::setGzip(bool gzip)</h2>
<p>Enable on-thy-fly gzipping of the sent entity. NOT IMPLEMENTED YET.</p>
<p>Enable on-thy-fly gzipping of the sent entity. NOT IMPLEMENTED YET.</p>
-<h2 id="H
TTPi_Response_getGzip">bool HTTPi_
Response::getGzip()</h2>
+<h2 id="H
ttpResponse_getGzip">bool Http
Response::getGzip()</h2>
<p>Get current gzipping setting.</p>
<p>Get current gzipping setting.</p>
-<h2 id="H
TTPi_Response_setCacheControl">bool HTTPi_
Response::setCacheControl(string control[, bool raw = false])</h2>
+<h2 id="H
ttpResponse_setCacheControl">bool Http
Response::setCacheControl(string control[, bool raw = false])</h2>
<p>Set a custom cache-control header, usually being "private" or "public"; if<br />
$raw is set to true the header will be sent as-is.</p>
<p>Set a custom cache-control header, usually being "private" or "public"; if<br />
$raw is set to true the header will be sent as-is.</p>
-<h2 id="H
TTPi_Response_getCacheControl">string HTTPi_
Response::getCacheControl()</h2>
+<h2 id="H
ttpResponse_getCacheControl">string Http
Response::getCacheControl()</h2>
<p>Get current Cache-Control header setting.</p>
<p>Get current Cache-Control header setting.</p>
-<h2 id="H
TTPi_Response_setContentType">bool HTTPi_
Response::setContentType(string content_type)</h2>
+<h2 id="H
ttpResponse_setContentType">bool Http
Response::setContentType(string content_type)</h2>
<p>Set the content-type of the sent entity.</p>
<p>Set the content-type of the sent entity.</p>
-<h2 id="H
TTPi_Response_getContentType">string HTTPi_
Response::getContentType()</h2>
+<h2 id="H
ttpResponse_getContentType">string Http
Response::getContentType()</h2>
<p>Get current Content-Type header setting.</p>
<p>Get current Content-Type header setting.</p>
-<h2 id="H
TTPi_Response_setContentDisposition">bool HTTPi_
Response::setContentDisposition(string filename[, bool inline = false])</h2>
+<h2 id="H
ttpResponse_setContentDisposition">bool Http
Response::setContentDisposition(string filename[, bool inline = false])</h2>
<p>Set the Content-Disposition of the sent entity. This setting aims to suggest<br />
the receiveing user agent how to handle the sent entity; usually the client<br />
will show the user a "Save As..." popup.</p>
<p>Set the Content-Disposition of the sent entity. This setting aims to suggest<br />
the receiveing user agent how to handle the sent entity; usually the client<br />
will show the user a "Save As..." popup.</p>
-<h2 id="H
TTPi_Response_getContentDisposition">array HTTPi_
Response::getContentDisposition()</h2>
+<h2 id="H
ttpResponse_getContentDisposition">array Http
Response::getContentDisposition()</h2>
<p>Get current Content-Disposition setting.<br />
Will return an associative array like:</p><pre>array(<br />
'filename' => 'foo.bar',<br />
'inline' => false<br />
)<br />
</pre></p>
<p>Get current Content-Disposition setting.<br />
Will return an associative array like:</p><pre>array(<br />
'filename' => 'foo.bar',<br />
'inline' => false<br />
)<br />
</pre></p>
-<h2 id="H
TTPi_Response_setETag">bool HTTPi_
Response::setETag(string etag)</h2>
+<h2 id="H
ttpResponse_setETag">bool Http
Response::setETag(string etag)</h2>
<p>Set a custom ETag. Use this only if you know what you're doing.</p>
<p>Set a custom ETag. Use this only if you know what you're doing.</p>
-<h2 id="H
TTPi_Response_getETag">string HTTPi_
Response::getETag()</h2>
+<h2 id="H
ttpResponse_getETag">string Http
Response::getETag()</h2>
<p>Get the previously set custom ETag.</p>
<p>Get the previously set custom ETag.</p>
-<h2 id="H
TTPi_Response_setData">bool HTTPi_
Response::setData(string data)</h2>
+<h2 id="H
ttpResponse_setData">bool Http
Response::setData(string data)</h2>
<p>Set the data to be sent.</p>
<p>Set the data to be sent.</p>
-<h2 id="H
TTPi_Response_getData">string HTTPi_
Response::getData()</h2>
+<h2 id="H
ttpResponse_getData">string Http
Response::getData()</h2>
<p>Get the previously set data to be sent.</p>
<p>Get the previously set data to be sent.</p>
-<h2 id="H
TTPi_Response_setStream">bool HTTPi_
Response::setStream(resource stream)</h2>
+<h2 id="H
ttpResponse_setStream">bool Http
Response::setStream(resource stream)</h2>
<p>Set the resource to be sent.</p>
<p>Set the resource to be sent.</p>
-<h2 id="H
TTPi_Response_getStream">resource HTTPi_
Response::getStream()</h2>
+<h2 id="H
ttpResponse_getStream">resource Http
Response::getStream()</h2>
<p>Get the previously set resource to be sent.</p>
<p>Get the previously set resource to be sent.</p>
-<h2 id="H
TTPi_Response_setFile">bool HTTPi_
Response::setFile(string file)</h2>
+<h2 id="H
ttpResponse_setFile">bool Http
Response::setFile(string file)</h2>
<p>Set the file to be sent.</p>
<p>Set the file to be sent.</p>
-<h2 id="H
TTPi_Response_getFile">string HTTPi_
Response::getFile()</h2>
+<h2 id="H
ttpResponse_getFile">string Http
Response::getFile()</h2>
<p>Get the previously set file to be sent.</p>
<p>Get the previously set file to be sent.</p>
-<h2 id="H
TTPi_Response_send">bool HTTPi_
Response::send()</h2>
+<h2 id="H
ttpResponse_send">bool Http
Response::send()</h2>
<p>Finally send the entity.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
<p>Finally send the entity.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
TTPi_
Response</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'../hidden/contract.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setContentType</span><span style="color: #007700">(</span><span style="color: #DD0000">'application/pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
ttp
Response</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'../hidden/contract.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setContentType</span><span style="color: #007700">(</span><span style="color: #DD0000">'application/pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
</pre></p>
</span><br />
</code></blockquote><br />
<br />
</pre></p>
-<h2 id="H
TTPi_Request___construct">void HTTPi_
Request::__construct([string url[, long request_method = HTTP_GET]])</h2>
-<p>Instantiate a new H
TTPi_
Request object which can be used to issue HEAD, GET<br />
+<h2 id="H
ttpRequest___construct">void Http
Request::__construct([string url[, long request_method = HTTP_GET]])</h2>
+<p>Instantiate a new H
ttp
Request object which can be used to issue HEAD, GET<br />
and POST (including posting files) HTTP requests.</p>
and POST (including posting files) HTTP requests.</p>
-<h2 id="H
TTPi_Request___destruct">void HTTPi_
Request::__destruct()</h2>
-<p>Destroys the H
TTPi_
Request object.</p>
-<h2 id="H
TTPi_Request_setOptions">bool HTTPi_
Request::setOptions(array options)</h2>
+<h2 id="H
ttpRequest___destruct">void Http
Request::__destruct()</h2>
+<p>Destroys the H
ttp
Request object.</p>
+<h2 id="H
ttpRequest_setOptions">bool Http
Request::setOptions(array options)</h2>
<p>Set the request options to use. See http_get() for a full list of available options.</p>
<p>Set the request options to use. See http_get() for a full list of available options.</p>
-<h2 id="H
TTPi_Request_getOptions">array HTTPi_
Request::getOptions()</h2>
+<h2 id="H
ttpRequest_getOptions">array Http
Request::getOptions()</h2>
<p>Get current set options.</p>
<p>Get current set options.</p>
-<h2 id="HTTPi_Request_setURL">bool HTTPi_Request::setURL(string url)</h2>
+<h2 id="HttpRequest_unsetOptions">void HttpRequest::unsetOptions()</h2>
+<p>Unset all options/headers/cookies.</p>
+<h2 id="HttpRequest_addHeader">bool HttpRequest::addHeader(array header)</h2>
+<p>Add (a) request header name/value pair(s).</p>
+<h2 id="HttpRequest_addCookie">bool HttpRequest::addCookie(array cookie)</h2>
+<p>Add (a) cookie(s).</p>
+<h2 id="HttpRequest_setURL">bool HttpRequest::setURL(string url)</h2>
<p>Set the request URL.</p>
<p>Set the request URL.</p>
-<h2 id="H
TTPi_Request_getURL">string HTTPi_
Request::getUrl()</h2>
+<h2 id="H
ttpRequest_getURL">string Http
Request::getUrl()</h2>
<p>Get the previously set request URL.</p>
<p>Get the previously set request URL.</p>
-<h2 id="H
TTPi_Request_setMethod">bool HTTPi_
Request::setMethod(long request_method)</h2>
+<h2 id="H
ttpRequest_setMethod">bool Http
Request::setMethod(long request_method)</h2>
<p>Set the request methods; one of the <tt>HTTP_HEAD</tt>, <tt>HTTP_GET</tt> or<br />
<tt>HTTP_POST</tt> constants.</p>
<p>Set the request methods; one of the <tt>HTTP_HEAD</tt>, <tt>HTTP_GET</tt> or<br />
<tt>HTTP_POST</tt> constants.</p>
-<h2 id="H
TTPi_Request_getMethod">long HTTPi_
Request::getMethod()</h2>
+<h2 id="H
ttpRequest_getMethod">long Http
Request::getMethod()</h2>
<p>Get the previously set request method.</p>
<p>Get the previously set request method.</p>
-<h2 id="H
TTPi_Request_setContentType">bool HTTPi_
Request::setContentType(string content_type)</h2>
+<h2 id="H
ttpRequest_setContentType">bool Http
Request::setContentType(string content_type)</h2>
<p>Set the content type the post request should have.<br />
Use this only if you know what you're doing.</p>
<p>Set the content type the post request should have.<br />
Use this only if you know what you're doing.</p>
-<h2 id="H
TTPi_Request_getContentType">string HTTPi_
Request::getContentType()</h2>
+<h2 id="H
ttpRequest_getContentType">string Http
Request::getContentType()</h2>
<p>Get the previously content type.</p>
<p>Get the previously content type.</p>
-<h2 id="H
TTPi_Request_setQueryData">bool HTTPi_
Request::setQueryData(mixed query_data)</h2>
+<h2 id="H
ttpRequest_setQueryData">bool Http
Request::setQueryData(mixed query_data)</h2>
<p>Set the URL query parameters to use.<br />
Overwrites previously set query parameters.<br />
Affects any request types.</p>
<p>Set the URL query parameters to use.<br />
Overwrites previously set query parameters.<br />
Affects any request types.</p>
-<h2 id="H
TTPi_Request_getQueryData">string HTTPi_
Request::getQueryData()</h2>
+<h2 id="H
ttpRequest_getQueryData">string Http
Request::getQueryData()</h2>
<p>Get the current query data in form of an urlencoded query string.</p>
<p>Get the current query data in form of an urlencoded query string.</p>
-<h2 id="H
TTPi_Request_addQueryData">bool HTTPi_
Request::addQueryData(array query_params)</h2>
+<h2 id="H
ttpRequest_addQueryData">bool Http
Request::addQueryData(array query_params)</h2>
<p>Add parameters to the query parameter list.<br />
Affects any request type.</p>
<p>Add parameters to the query parameter list.<br />
Affects any request type.</p>
-<h2 id="H
TTPi_Request_unsetQueryData">void HTTPi_
Request::unsetQueryData()</h2>
+<h2 id="H
ttpRequest_unsetQueryData">void Http
Request::unsetQueryData()</h2>
<p>Clean the query parameters.<br />
Affects any request type.</p>
<p>Clean the query parameters.<br />
Affects any request type.</p>
-<h2 id="H
TTPi_Request_addPostData">bool HTTPi_
Request::addPostData(array post_data)</h2>
+<h2 id="H
ttpRequest_addPostData">bool Http
Request::addPostData(array post_data)</h2>
<p>Adds POST data entries.<br />
Affects only POST requests.</p>
<p>Adds POST data entries.<br />
Affects only POST requests.</p>
-<h2 id="H
TTPi_Request_setPostData">bool HTTPi_
Request::setPostData(array post_data)</h2>
+<h2 id="H
ttpRequest_setPostData">bool Http
Request::setPostData(array post_data)</h2>
<p>Set the POST data entries.<br />
Overwrites previously set POST data.<br />
Affects only POST requests.</p>
<p>Set the POST data entries.<br />
Overwrites previously set POST data.<br />
Affects only POST requests.</p>
-<h2 id="H
TTPi_Request_getPostData">array HTTPi_
Request::getPostData()</h2>
+<h2 id="H
ttpRequest_getPostData">array Http
Request::getPostData()</h2>
<p>Get previously set POST data.</p>
<p>Get previously set POST data.</p>
-<h2 id="H
TTPi_Request_unsetPostData">void HTTPi_
Request::unsetPostData()</h2>
+<h2 id="H
ttpRequest_unsetPostData">void Http
Request::unsetPostData()</h2>
<p>Clean POST data entires.<br />
Affects only POST requests.</p>
<p>Clean POST data entires.<br />
Affects only POST requests.</p>
-<h2 id="H
TTPi_Request_addPostFile">bool HTTPi_
Request::addPostFile(string name, string file[, string content_type = "application/x-octetstream"])</h2>
+<h2 id="H
ttpRequest_addPostFile">bool Http
Request::addPostFile(string name, string file[, string content_type = "application/x-octetstream"])</h2>
<p>Add a file to the POST request.<br />
Affects only POST requests.</p>
<p>Add a file to the POST request.<br />
Affects only POST requests.</p>
-<h2 id="H
TTPi_Request_getPostFiles">array HTTPi_
Request::getPostFiles()</h2>
+<h2 id="H
ttpRequest_getPostFiles">array Http
Request::getPostFiles()</h2>
<p>Get all previously added POST files.</p>
<p>Get all previously added POST files.</p>
-<h2 id="H
TTPi_Request_unsetPostFiles">void HTTPi_
Request::unsetPostFiles()</h2>
+<h2 id="H
ttpRequest_unsetPostFiles">void Http
Request::unsetPostFiles()</h2>
<p>Unset the POST files list.<br />
Affects only POST requests.</p>
<p>Unset the POST files list.<br />
Affects only POST requests.</p>
-<h2 id="H
TTPi_Request_getResponseData">array HTTPi_
Request::getResponseData()</h2>
+<h2 id="H
ttpRequest_getResponseData">array Http
Request::getResponseData()</h2>
<p>Get all response data after the request has been sent.</p>
<p>Get all response data after the request has been sent.</p>
-<h2 id="H
TTPi_Request_getResponseHeader">string HTTPi_
Request::getResponseHeader([string name])</h2>
+<h2 id="H
ttpRequest_getResponseHeader">string Http
Request::getResponseHeader([string name])</h2>
<p>Get response header(s) after the request has been sent.</p>
<p>Get response header(s) after the request has been sent.</p>
-<h2 id="H
TTPi_Request_getResponseBody">string HTTPi_
Request::getResponseBody()</h2>
+<h2 id="H
ttpRequest_getResponseBody">string Http
Request::getResponseBody()</h2>
<p>Get the response body after the request has been sent.</p>
<p>Get the response body after the request has been sent.</p>
-<h2 id="H
TTPi_Request_getResponseCode">int HTTPi_
Request::getResponseCode()</h2>
+<h2 id="H
ttpRequest_getResponseCode">int Http
Request::getResponseCode()</h2>
<p>Get the response code after the request has been sent.</p>
<p>Get the response code after the request has been sent.</p>
-<h2 id="H
TTPi_Request_getResponseInfo">array HTTPi_
Request::getResponseInfo([string name])</h2>
+<h2 id="H
ttpRequest_getResponseInfo">array Http
Request::getResponseInfo([string name])</h2>
<p>Get response info after the request has been sent.<br />
See http_get() for a full list of returned info.</p>
<p>Get response info after the request has been sent.<br />
See http_get() for a full list of returned info.</p>
-<h2 id="H
TTPi_Request_send">bool HTTPi_
Request::send()</h2>
+<h2 id="H
ttpRequest_send">bool Http
Request::send()</h2>
<p>Send the HTTP request.<br />
<br />
GET example:</p><pre><blockquote><code><span style="color: #000000"><br />
<p>Send the HTTP request.<br />
<br />
GET example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
TTPi_
Request</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/feed.rss'</span><span style="color: #007700">, </span><span style="color: #0000BB">HTTP_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified' </span><span style="color: #007700">=> </span><span style="color: #0000BB">filemtime</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">() && </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() == </span><span style="color: #0000BB">200</span><span style="color: #007700">) {<br /> </span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">, </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br />}<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
ttp
Request</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/feed.rss'</span><span style="color: #007700">, </span><span style="color: #0000BB">HTTP_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified' </span><span style="color: #007700">=> </span><span style="color: #0000BB">filemtime</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">() && </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() == </span><span style="color: #0000BB">200</span><span style="color: #007700">) {<br /> </span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">, </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote></pre><p>POST example:</p><pre><blockquote><code><span style="color: #000000"><br />
</span><br />
</code></blockquote></pre><p>POST example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
TTPi_
Request</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/form.php'</span><span style="color: #007700">, </span><span style="color: #0000BB">HTTP_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies' </span><span style="color: #007700">=> array(</span><span style="color: #DD0000">'lang' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'mike'</span><span style="color: #007700">, </span><span style="color: #DD0000">'pass' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">, </span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">, </span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">()) {<br /> echo </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </span><span style="color: #0000BB">H
ttp
Request</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/form.php'</span><span style="color: #007700">, </span><span style="color: #0000BB">HTTP_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies' </span><span style="color: #007700">=> array(</span><span style="color: #DD0000">'lang' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'mike'</span><span style="color: #007700">, </span><span style="color: #DD0000">'pass' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">, </span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">, </span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">()) {<br /> echo </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
</pre></p>
<hr noshade>
</span><br />
</code></blockquote><br />
<br />
</pre></p>
<hr noshade>
- <p><b>Generated at:
Mon, 7 Mar 2005 14:09:33
+0100</b></p>
+ <p><b>Generated at:
Tue, 22 Mar 2005 15:41:10
+0100</b></p>
</body>
</html>
</body>
</html>