From 7f98cab1b4387fd1ebc133381f73ba32e2baf571 Mon Sep 17 00:00:00 2001 From: "Dr. Andreas Fischer" <45405681+AndreasFischer1985@users.noreply.github.com> Date: Sat, 7 Sep 2024 12:12:38 +0200 Subject: [PATCH] Delete api_example.php --- api_example.php | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 api_example.php diff --git a/api_example.php b/api_example.php deleted file mode 100644 index 729b9d5..0000000 --- a/api_example.php +++ /dev/null @@ -1,36 +0,0 @@ - '1c852184-1944-4a9e-a093-5cc078981294', - 'client_secret' => '777f9915-9f0d-4982-9c33-07b5810a3e79', - 'grant_type' => 'client_credentials'); -$options = array( - 'http' => array( - 'method' => 'POST', - 'content' => http_build_query($data) - ) -); -$context = stream_context_create($options); -$tokendata = file_get_contents($url, false, $context); -header('Content-Type: application/json'); -if(isset($_GET['token']) & $_GET['token']==='TRUE'){ - echo $tokendata; -} else { - // GET-request: - //------------- - $url = 'https://rest.arbeitsagentur.de/infosysbub/absuche/pc/v1/ausbildungsangebot?'.$_SERVER['QUERY_STRING']; - $options = array( - 'http' => array( - 'header' => "OAuthAccessToken:".json_decode($tokendata, true)['access_token']." \r\n", - 'method' => 'GET' - ) - ); - $context = stream_context_create($options); - $searchdata = file_get_contents($url, false, $context); - echo $searchdata; -} -?> -