- example fixup
authorMichael Wallner <mike@php.net>
Fri, 16 Sep 2005 14:07:26 +0000 (14:07 +0000)
committerMichael Wallner <mike@php.net>
Fri, 16 Sep 2005 14:07:26 +0000 (14:07 +0000)
docs/examples/KISS_XMLRPC_Client.php
docs/examples/Multipart_Posts.php
docs/examples/Parallel_Requests.php
docs/examples/Parallel_Requests_.php
docs/examples/Simple_Feed_Aggregator.php
docs/examples/tutorial.txt

index 35380db9853759d19df1b1ca6c1bd7cb0e54896e..b9e955b6e969f5ae7dd30fafce80d2d6272d1bdf 100644 (file)
@@ -7,7 +7,7 @@ class XmlRpcClient
        public function __construct($url, $namespace = '')
        {
                $this->namespace = $namespace;
-               $this->request = new HttpRequest($url, HTTP_POST);
+               $this->request = new HttpRequest($url, HTTP_METH_POST);
                $this->request->setContentType('text/xml');
        }
 
index eb9b171ea60c47193a210edc6e9c36065fce2144..2656b313bf8cddfa8b724f25e1b51bfd05ab994b 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_POST);
+$r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_METH_POST);
 
 // if redirects is set to true, a single redirect is allowed;
 // one can set any reasonable count of allowed redirects
index 474adafdeb6a2c774be8c090ee2d5c206a97acfb..d9b05f0fe8b9e09163585aeede0b0dbe9958598f 100644 (file)
@@ -3,8 +3,8 @@ try {
        $p = new HttpRequestPool;
        // if you want to set _any_ options of the HttpRequest object,
        // you need to do so *prior attaching* to the request pool!
-       $p->attach(new HttpRequest('http://pear.php.net', HTTP_HEAD));
-       $p->attach(new HttpRequest('http://pecl.php.net', HTTP_HEAD));
+       $p->attach(new HttpRequest('http://pear.php.net', HTTP_METH_HEAD));
+       $p->attach(new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD));
 } catch (HttpException $e) {
        print $e;
        exit;
index 94c69df2e0cc612e3acb9c6e7e96fa0fc3c75141..8798c30f6b5680f92f85c3759bd7a65efc163882 100644 (file)
@@ -4,8 +4,8 @@ class Pool extends HttpRequestPool
        public function __construct()
        {
                parent::__construct(
-                       new HttpRequest('http://pear.php.net', HTTP_HEAD),
-                       new HttpRequest('http://pecl.php.net', HTTP_HEAD)
+                       new HttpRequest('http://pear.php.net', HTTP_METH_HEAD),
+                       new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD)
                );
 
                // HttpRequestPool methods socketPerform() and socketSelect() are
index 074c2079e457080576279b1fa01d8596435aac69..c28e83873fa2cb09429dd01d324aec327ba777e5 100644 (file)
@@ -110,9 +110,6 @@ class FeedAggregator
                        }
                        $this->saveFeed($this->url2name($r->getUrl()), $body);
                }
-        echo $r->getHistory();
        }
 }
-$a = new FeedAggregator();
-$a->getFeed('http://www.planet-php.net/rss/');
 ?>
index d8d9fad84581dd48afd41703bc5d456f5feaf6f9..b29fa96c99b10b83fac958979936ab950fbda156 100644 (file)
@@ -44,7 +44,7 @@ try {
        redirect option.
 
 <?php
-$r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_POST);
+$r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_METH_POST);
 
 // if redirects is set to true, a single redirect is allowed;
 // one can set any reasonable count of allowed redirects
@@ -82,8 +82,8 @@ try {
        $p = new HttpRequestPool;
        // if you want to set _any_ options of the HttpRequest object,
        // you need to do so *prior attaching* to the request pool!
-       $p->attach(new HttpRequest('http://pear.php.net', HTTP_HEAD));
-       $p->attach(new HttpRequest('http://pecl.php.net', HTTP_HEAD));
+       $p->attach(new HttpRequest('http://pear.php.net', HTTP_METH_HEAD));
+       $p->attach(new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD));
 } catch (HttpException $e) {
        print $e;
        exit;
@@ -112,8 +112,8 @@ class Pool extends HttpRequestPool
        public function __construct()
        {
                parent::__construct(
-                       new HttpRequest('http://pear.php.net', HTTP_HEAD),
-                       new HttpRequest('http://pecl.php.net', HTTP_HEAD)
+                       new HttpRequest('http://pear.php.net', HTTP_METH_HEAD),
+                       new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD)
                );
 
                // HttpRequestPool methods socketPerform() and socketSelect() are
@@ -186,7 +186,7 @@ class XmlRpcClient
        public function __construct($url, $namespace = '')
        {
                $this->namespace = $namespace;
-               $this->request = new HttpRequest($url, HTTP_POST);
+               $this->request = new HttpRequest($url, HTTP_METH_POST);
                $this->request->setContentType('text/xml');
        }