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