Testing Curl
This commit is contained in:
parent
dd28dc1c99
commit
dbec0cfb48
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue