Sending a HTTP Post from magento 1.6 after customer registration?

拜拜、爱过 提交于 2019-12-06 11:03:33

问题


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


回答1:


$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) {
}


来源:https://stackoverflow.com/questions/8150814/sending-a-http-post-from-magento-1-6-after-customer-registration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!