15 July 2019

form mail send in crm in php api

<?php
if($_POST['mail_query']){
extract($_POST);
$project='KW Delhi 6';
$url="http://kw01.remserp.com/IVR_Inbound.aspx?UID=fourqt&PWD=wn9mxO76f34=&f=m&con=".urlencode($phone)."&email=".urlencode($email)."&name=".urlencode($name)."&Proj=".urlencode($project)."&src=".urlencode('Google Ads Web Leads')."&ch=GA";
//$url="//kw01.remserp.com/IVR_Inbound.aspx";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 300);
$result=curl_exec($ch);

?>
<script>
    alert('Thanks for submitting form\n We will get back to you soon.');
</script>
<?php
}else{
?>
<script>
    alert('Unable to send message\n Please try Later.');
</script>
<?php } ?>