在客户注册后从magento 1.6发送HTTP帖子? [英] Sending a HTTP Post from magento 1.6 after customer registration?
本文介绍了在客户注册后从magento 1.6发送HTTP帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这将是基本信息,如姓名,地址,邮政编码,电子邮件等。
不知道从哪里开始?
非常感谢
解决方案
$ client = new Varien_Http_Client('http:// www .example.com的/');
$ client-> setMethod(Varien_Http_Client :: POST);
$ client-> setParameterPost('name',$ name);
$ client-> setParameterPost('address',$ address);
//更多参数
try {
$ response = $ client-> request();
if($ response-> isSuccessful()){
echo $ response-> getBody();
}
} catch(例外$ e){
}
can anyone point me in the right direction I need to send a HTTP post when a customer registers and or makes a purchase from Magento to a third part server ?
It will be the basic information like name, address, postcode , email ect.
Not sure where to start ?
Many thanks
解决方案
$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) {
}
这篇关于在客户注册后从magento 1.6发送HTTP帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文