Led*_*key 2 http http-post magento
任何人都可以指出我正确的方向我需要在客户注册或从Magento购买第三方服务器时发送HTTP帖子?
这将是基本信息,如姓名,地址,邮政编码,电子邮件等.
不知道从哪里开始 ?
非常感谢
Max*_*Max 11
$client = new Varien_Http_Client('http://www.example.com/');
$client->setMethod(Varien_Http_Client::POST);
$client->setParameterPost('name', $name);
$client->setParameterPost('address', $address);
//more parameters
try{
$response = $client->request();
if ($response->isSuccessful()) {
echo $response->getBody();
}
} catch (Exception $e) {
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5715 次 |
最近记录: |