api creating task files
This commit is contained in:
parent
2366370e67
commit
2f5232e1c7
13
api.php
13
api.php
|
@ -45,8 +45,9 @@ if (isset($_POST['sitze']) && is_array($_POST['sitze']) && count($_POST['sitze']
|
||||||
$sitze[] = $community["bfsId"];
|
$sitze[] = $community["bfsId"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$requests_to_do = Array();
|
||||||
// Loop through the selected values
|
// Loop through the selected values
|
||||||
$taskString = '';
|
|
||||||
foreach ($rechtsformen as $rechtsform) {
|
foreach ($rechtsformen as $rechtsform) {
|
||||||
$data["legalFormId"] = $rechtsform;
|
$data["legalFormId"] = $rechtsform;
|
||||||
|
|
||||||
|
@ -54,13 +55,15 @@ $taskString = '';
|
||||||
foreach ($sitze as $sitz) {
|
foreach ($sitze as $sitz) {
|
||||||
$data["legalSeatId"] = $sitz;
|
$data["legalSeatId"] = $sitz;
|
||||||
//$response = sendAPICompanySearchRequest($username, $password, $data);
|
//$response = sendAPICompanySearchRequest($username, $password, $data);
|
||||||
$taskString = $taskString.json_encode($data).'\n';
|
$requests_to_do[] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$taskdata = Array();
|
||||||
|
$taskdata['requests'] = $requests_to_do;
|
||||||
$taskfilename = '/tasks/'.time().bin2hex(random_bytes(4)).'txt';
|
$taskdata['email'] = 'roman.schenk37@gmail.com';
|
||||||
|
$taskString = json_encode($taskdata);
|
||||||
|
$taskfilename = 'tasks/'.time().'-'.bin2hex(random_bytes(4)).'.txt';
|
||||||
$taskfile = fopen($taskfilename, 'w');
|
$taskfile = fopen($taskfilename, 'w');
|
||||||
if($taskfile){
|
if($taskfile){
|
||||||
echo "writing to file";
|
echo "writing to file";
|
||||||
|
|
Loading…
Reference in New Issue