Hello,
I’ve got to put together an online shop where the client wants details (captured at the checkout, probably) to be added to her CRM system (Zoho). Seeing as Zoho has a form builder I’m thinking that I can POST directly into the program from the checkout forms, but I obviously need to capture the data myself.
Would it be possible to process the form in the usual way and then automatically POST the contents to another script?
Any help would be greatly appreciated.
Cheers,
Jon
If the shopping cart as a callback function that is where you could create a POST script to send the details to Zoho. I know that Mals-e offers this in his shopping cart.
Untested, but something along the lines of…
function forward_post_data($url){
return false !== file_get_contents(
$url,
false,
stream_context_create(
array(
'http' => array(
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded\\r\
",
'content' => http_build_query($_POST)
)
)
)
);
}
#do stuff
forward_post_data('http://www.example.com/post/receiver/');
Thanks for that, looks good I’ll give it a go.
Cheers,
Jon