Re: problem with HTTP_Client::post
| From: | Fumiaki Kato | Date: | Sat, 29 Oct 2005 12:31:50 +0000 |
| Subject: | Re: problem with HTTP_Client::post | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21696@lists.php.net to get a copy of this message | ||
Hi Leo,
thanks for the quick response!
I wrote a "test.php"
<?php
var_dump($_POST);
?>
then I post
$url="http://example.com/test.php";
$data="abc=123&cde=567";
$httpClient = new HTTP_Client();
$httpClient->post($url, $data);
What kind of method there is to receive the response?
any HELP again?
cheers
Kato
At 15:28 05/10/29, you wrote:
>
>Hey Kato,
>
>> I run myphpscript included the Client.php page.
>> when I call HTTP_Client::post I get this error Call to a member function
>> on a non-object in
>> HTTP/Client.php on line 214.
>HTTP_Client::post won't work since post() is not a static function.
>You have to create an HTTP_Client object and then use it.
>
>$httpClient = new HTTP_Client();
>$httpClient->post(...);
>
>--Leo