- examples fixup
authorMichael Wallner <mike@php.net>
Sun, 9 Oct 2005 16:07:12 +0000 (16:07 +0000)
committerMichael Wallner <mike@php.net>
Sun, 9 Oct 2005 16:07:12 +0000 (16:07 +0000)
docs/examples/GET_Queries.php
docs/examples/KISS_XMLRPC_Client.php
docs/examples/tutorial.txt
docs/http.ini

index cb21cb6de2bbd085ca8a2622f3a034bf7b36f967..671f640b9c2ae31caedd77236d46c712c3948d3f 100644 (file)
@@ -1,9 +1,10 @@
 <?php
-$r = new HttpRequest('http://www.google.com');
+$r = new HttpRequest('http://www.google.com/search');
 
 // store Googles cookies in a dedicated file
+touch('google.txt');
 $r->setOptions(
-       array(  'cookiestore'   => '../cookies/google.txt',
+       array(  'cookiestore'   => 'google.txt',
        )
 );
 
index b9e955b6e969f5ae7dd30fafce80d2d6272d1bdf..ac7498d611caa9f87d6fd2af5a5de2eb7c89e497 100644 (file)
@@ -26,7 +26,7 @@ class XmlRpcClient
                if ($this->namespace) {
                        $method = $this->namespace .'.'. $method;
                }
-               $this->request->setPostData(xmlrpc_encode_request($method, $params));
+               $this->request->setRawPostData(xmlrpc_encode_request($method, $params));
                $response = $this->request->send();
                if ($response->getResponseCode() != 200) {
                        throw new Exception($response->getBody(), $response->getResponseCode());
index b29fa96c99b10b83fac958979936ab950fbda156..96ee9de72cd4652ccb7b9c1f3e856a77beaa6ae4 100644 (file)
@@ -12,11 +12,12 @@ $Revision$
        read from and written to a file.
 
 <?php
-$r = new HttpRequest('http://www.google.com');
+$r = new HttpRequest('http://www.google.com/search');
 
 // store Googles cookies in a dedicated file
+touch('google.txt');
 $r->setOptions(
-       array(  'cookiestore'   => '../cookies/google.txt',
+       array(  'cookiestore'   => 'google.txt',
        )
 );
 
@@ -205,7 +206,7 @@ class XmlRpcClient
                if ($this->namespace) {
                        $method = $this->namespace .'.'. $method;
                }
-               $this->request->setPostData(xmlrpc_encode_request($method, $params));
+               $this->request->setRawPostData(xmlrpc_encode_request($method, $params));
                $response = $this->request->send();
                if ($response->getResponseCode() != 200) {
                        throw new Exception($response->getBody(), $response->getResponseCode());
index 73c909c0c62ad22ca3e4ccfa7eca001e44cf7445..bd575f2fb73ab1fb07f7bab8d1b964d00ba03f40 100644 (file)
@@ -8,7 +8,7 @@ http.only_exceptions = 0
 ; the hashing algorithm with wich ETags are generated
 ; you can use mhash constants if ext/mhash is enabled, or their 
 ; literal representation if ext/http was linked against libmhash
-;http.etag_mode = MHASH_TIGER ; same as 7
+;http.etag_mode = HTTP_ETAG_MHASH_TIGER ; same as 7
 http.etag_mode = HTTP_ETAG_MD5
 
 ; allowed request methods