$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'http://', 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 =>'{ "receiverId": "'.$subject['code'].'", "invoiceDate": "", "invoiceItems": [ { "ident": "'.$product['id'].'", "quantity": 1 }, { "ident": "'.$product['id'].'", "quantity": 1 } ] }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Authorization: Basic UEFXUzoxMjNQQVdTMQ==' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)