<?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',
)
);
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());
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',
)
);
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());
; 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