gayanc
5/18/2018 - 1:05 PM

ai_request.php

<?php 
$curl = curl_init();curl_setopt_array($curl, array(CURLOPT_URL => "http://35.188.217.13/ClaimAI/api.php",CURLOPT_RETURNTRANSFER => true,CURLOPT_ENCODING => "",CURLOPT_MAXREDIRS => 10,CURLOPT_TIMEOUT => 30,CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST => "POST",CURLOPT_POSTFIELDS => "{\"Vehicle_RegNo\":\"YC-9488\",\"Claim_No\":\"809544357\",\"MAR_NO\":\"80934689\",\"Vehicle_Type\":\"Auto Rickshaw\",\"Manufacture\":\"2014\",\"Make\":\"Bajaj\",\"Model\":\"RE 205\",\"Claim_Type\":\"C2C\",\"Offered_Amt\":\"23000\",\"Location\":\"Central\",\"images\":{\"1\":\"http://161.202.21.7/fairfirst/images/AAJ-0413/01.jpg\"}}",CURLOPT_HTTPHEADER => array("authorization: Basic ZmFpcmZpcnN0OnRzcmlmcmlhZg==","cache-control: no-cache","postman-token: 95adbba2-739c-ebdc-4c41-e62c3517ab78"),));$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) {echo "cURL Error #:" . $err;} else {echo $response;}