auteenticateApiCode
<?php
// kvstore API url
//$url = 'http://localhost:53992/api/AnticounterFietService';
$url = 'http://api2.vcqru.com/api/AnticounterFietService';
$code1= trim($_POST['code1']);
$code2= trim($_POST['code2']);
$FristName= trim($_POST['FristName']);
$LastName= "";
$mobile= trim($_POST['mobile']);
$EmailId= trim($_POST['EmailId']);
$State= trim($_POST['State']);
$City= trim($_POST['City']);
$Pincode= trim($_POST['Pincode']);
$CompanyNamee= trim($_POST['CompanyName']);
$data3 = array();
$data3 = array(
'CompanyName' => $CompanyNamee,
'code1' => $code1,
'code2' => $code2,
'mobile' => $mobile,
'FristName' => $FristName,
'LastName' => "",
'EmailId' => $EmailId,
'Pincode' => $Pincode,
'City' => $City,
'State' => $State
);
$data["ScanInfo"] = $data3;
$json = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($json)
));
$response = curl_exec($ch);
if(curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
// kvstore API url
//$url = 'http://localhost:53992/api/AnticounterFietService';
$url = 'http://api2.vcqru.com/api/AnticounterFietService';
$code1= trim($_POST['code1']);
$code2= trim($_POST['code2']);
$FristName= trim($_POST['FristName']);
$LastName= "";
$mobile= trim($_POST['mobile']);
$EmailId= trim($_POST['EmailId']);
$State= trim($_POST['State']);
$City= trim($_POST['City']);
$Pincode= trim($_POST['Pincode']);
$CompanyNamee= trim($_POST['CompanyName']);
$data3 = array();
$data3 = array(
'CompanyName' => $CompanyNamee,
'code1' => $code1,
'code2' => $code2,
'mobile' => $mobile,
'FristName' => $FristName,
'LastName' => "",
'EmailId' => $EmailId,
'Pincode' => $Pincode,
'City' => $City,
'State' => $State
);
$data["ScanInfo"] = $data3;
$json = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($json)
));
$response = curl_exec($ch);
if(curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>