'http://10.3.158.102:9999/api/clientinfo/all', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => sprintf('{ "idSeria": "%s", "idNo": "%s", "clientType": "recipient", "cardMaskNumber": "%s", "expDate": "%s", "fromDate" : "01.01.2020", "toDate" : "09.05.2025" }', $passport_serie, $passport_number, $card_number_masked, $card_expire_date), CURLOPT_HTTPHEADER => [ 'Authorization: Basic dGJ1c2VyOlFBWndzeDEyMw==', 'Content-Type: application/json', ], ]); $response = curl_exec($curl); curl_close($curl); return "
{$response}
"; } }