Testing Curl

This commit is contained in:
schrom01 2023-08-21 17:08:15 +02:00
parent dd28dc1c99
commit dbec0cfb48
1 changed files with 6 additions and 6 deletions

View File

@ -1,10 +1,9 @@
<?php <?php
//include 'env_vars.php'; //include 'env_vars.php';
//$username = getenv("username"); $username = getenv("username");
//$password = getenv("password"); $password = getenv("password");
$username = "username";
$password = "password";
// API endpoint // API endpoint
$apiUrl = 'https://www.zefix.admin.ch/ZefixPublicREST/apicompany/search'; $apiUrl = 'https://www.zefix.admin.ch/ZefixPublicREST/apicompany/search';
@ -22,9 +21,10 @@ $data = array(
// Headers // Headers
$headers = array( $headers = array(
"apiKey: mykey" "username:".$username,
"password:".$password
); );
phpinfo();
// Initialize cURL session // Initialize cURL session
$ch = curl_init(); $ch = curl_init();