From c206ea3250253519e307493a73eb67bb9005d8b4 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 17 Aug 2023 21:38:35 +0200 Subject: [PATCH] remove visible password --- api/index.php | 65 ++++++++++++++++++++++++++++-- index.php | 108 ++++++++++++++++++++++++++++++++------------------ 2 files changed, 131 insertions(+), 42 deletions(-) diff --git a/api/index.php b/api/index.php index 2812ff8..b1142a1 100644 --- a/api/index.php +++ b/api/index.php @@ -1,7 +1,66 @@ "Silias KLG", + "legalFormId" => 4, + "legalFormUid" => "0107", + "registryOfCommerceId" => 36, + "legalSeatId" => 623, + "canton" => "BE", + "activeOnly" => true +); + +// Headers +$headers = array( + "apiKey: mykey" +); + +// Initialize cURL session +$ch = curl_init(); + +// Set cURL options +curl_setopt($ch, CURLOPT_URL, $apiUrl); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +// Execute cURL session and get the response +$response = curl_exec($ch); + +// Check for cURL errors +if (curl_errno($ch)) { + echo 'Curl error: ' . curl_error($ch); +} + +// Close cURL session +curl_close($ch); + +// Output the API response +echo $response; +?> + + +// Close cURL +curl_close($ch); + +// Process the Zefix response and construct your own response +// ... +$constructed_response = $response; + +// Send the response back to the client +header('Content-Type: application/json'); +echo $constructed_response; + ?> \ No newline at end of file diff --git a/index.php b/index.php index f77f57e..498ba19 100644 --- a/index.php +++ b/index.php @@ -8,7 +8,7 @@ Silias Zefix Suche