Skip to content

Instantly share code, notes, and snippets.

@Danisan
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Danisan/9a2a32f94836769c37fb to your computer and use it in GitHub Desktop.
Save Danisan/9a2a32f94836769c37fb to your computer and use it in GitHub Desktop.
Testeo de formulario de SuiteCRM
<?php
$postform = Array(
'entryPoint' => 'WebToLeadCapture',
'first_name' => 'Daniel',
'last_name' => 'Daniel',
'campaign_id' => 'a53d5255-049c-fa69-4c92-5567aac6ffe2',
'assigned_user_id' => '1',
'webtolead_email1' => 'email@example.com',
);
error_log(json_encode($postform));
$url = URL;
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postform);
$response = curl_exec($curl);
var_dump($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment