Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

add document by api php

<?php
//function to add lead by API
function ADDLeadCamp($companyID,$name,$prenom,$email,$societe,$phone){

	$data = array('campaign_id'=>$companyID,'nom'=>$name,'prenom'=>$prenom,'email' =>$email,
	'phone'=>$phone,
	'societe'=>$societe,
  );
   $URL     = 'https://www.yestravaux.com/webservice/crm/lead.php';
   $data=json_encode($data);
   $POSTVALUE  = 'fct=AddLeadApi&data='.$data.'&cmpid='.$companyID; 
   $dataAddLead=curl_do_post($URL,$POSTVALUE);
  if($dataAddLead==1){
	  echo 'ok';
}
else{
	echo 'error';
}}
?>
Source by yestravaux.com #
 
PREVIOUS NEXT
Tagged: #add #document #api #php
ADD COMMENT
Topic
Name
1+5 =