Sitze und Rechtsformen aus Zefix API
This commit is contained in:
parent
f9701e936f
commit
d294253a27
|
@ -50,7 +50,7 @@ if (isset($_POST['sitze']) && is_array($_POST['sitze']) && count($_POST['sitze']
|
|||
$response = sendAPICompanySearchRequest($username, $password, $data);
|
||||
|
||||
// echo $response;
|
||||
echo communityCSV($username, $password);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,4 @@ $constructed_response = $response;
|
|||
//header('Content-Type: application/json');
|
||||
//echo $constructed_response;
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -4,6 +4,7 @@ $username = getenv("username");
|
|||
$password = getenv("password");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param string $
|
||||
* @param string $
|
||||
|
@ -41,7 +42,6 @@ echo 'Curl error: ' . curl_error($ch);
|
|||
}
|
||||
// Close cURL session
|
||||
curl_close($ch);
|
||||
echo $response;
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,6 @@ function sendAPICommunityRequest(string $username, string $password): string|boo
|
|||
|
||||
function communityCSV(string $username, string $password): string {
|
||||
$response = sendAPICommunityRequest($username, $password);
|
||||
echo $response;
|
||||
$communityArray = json_decode($response, true);
|
||||
$csvOutput = 'bfsId,Kanton,Gemeindename,registryOfCommerceId\n';
|
||||
// Create CSV rows
|
||||
|
@ -138,5 +137,4 @@ function legalFormCSV(string $username, string $password): string {
|
|||
return $csvOutput;
|
||||
}
|
||||
|
||||
sendAPICommunityRequest($username, $password);
|
||||
?>
|
Loading…
Reference in New Issue