From d9de3413217005c069c041bd4c91eba4d6c66ae7 Mon Sep 17 00:00:00 2001 From: "Dr. Andreas Fischer" <45405681+AndreasFischer1985@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:04:41 +0200 Subject: [PATCH] Delete api_example.php --- api_example.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 api_example.php diff --git a/api_example.php b/api_example.php deleted file mode 100644 index 5539298..0000000 --- a/api_example.php +++ /dev/null @@ -1,37 +0,0 @@ - '5aee2cfe-1709-48a9-951d-eb48f8f73a74', - 'client_secret' => '3309a57a-9214-40db-9abe-28b1bb30c08c', - '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/studisu/pc/v1/studienangebote?'.$_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; -} -?> -