| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- $url = "https://webdev.services.vision4it.de/kunden/xtend2/offboarding_mail.php";
- // The data to send to the API
- $postData = json_decode('{
- "enddatum": "2024-07-31",
- "ap": "Stefanie Uhler",
- "anrede": "Herr",
- "name": {
- "vorname": "Andreas",
- "nachname": "Schiefer"
- },
- "infos": "Info 1\nInfo 2"
- }');
- // Setup cURL
- $ch = curl_init($url);
- curl_setopt_array($ch, array(
- CURLOPT_POST => TRUE,
- CURLOPT_RETURNTRANSFER => TRUE,
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json;charset=UTF-8'
- ),
- CURLOPT_POSTFIELDS => json_encode($postData)
- ));
- // Send the request
- $response = curl_exec($ch);
- // Check for errors
- if($response === FALSE){
- die(curl_error($ch));
- }
- // Decode the response
- $responseData = json_decode($response, TRUE);
- // Close the cURL handler
- curl_close($ch);
- // Print the date from the response
- var_dump($responseData);
- ?>
|