Hi @SanfordWhiteman thanks for the reply.
Using post method of java script API 2.0 works fine. but I when same thing we try to achieve using CURL code is as follows.
$curlURL = "https://xxxx.marketo.com/leadCapture/save"; // replace with our domain name on marketo $fields = array('formid'=>1001, 'formVid'=>1001, 'munchkinId'=>'000-GIE-000', 'Email'=>'curlapi.com', 'FirstName'=>'curlapiFname', 'LastName'=>'curlapiLname', 'formName'=>'TOFU_Leads_Form'); $payload = ''; foreach($fields as $k=>$v) { $payload .= $k.'='.$v.'&'; } $payload = urlencode(rtrim($payload , '&')); $ch = curl_init($curlURL); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); print_r($result); curl_close($ch);
I have curiosity why its not working
... View more