1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| <?php
function RCPASpec()
{
if (isset($_POST['Index'])) {
$index = $_POST['Index'];
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://localhost/Specific',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{ "Parameters": { "Categorie": "Shot", "Index": 2 }, "GenerateTransaction": true }',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
// echo $response;
curl_close($curl);
} |
Partager