mail; curl_close($cRequest); $pdo = new PDO('mysql:host=localhost;dbname=dev-intranet;charset=utf8', "dev-user", "AcdinemGeor5qua"); $GLOBALS["pdo_conn"] = $pdo; // echo $token."
".$email."
".$refresh_token; $noPublish = "CALL insertTokenMicrosoftKey('$token[0]', '$email', '$token[1]')"; $stmt = $pdo->prepare($noPublish); $stmt->execute(); $count = $stmt->fetchColumn(); ?> ' '998f5db8-f544-4dda-a10a-79eda88a5437', 'scope' => 'openid User.ReadWrite Calendars.ReadWrite Presence.ReadWrite', 'code' => $code, 'redirect_uri' => 'https://dev-intranet.breadcrumb-online.de/module/api/testGraph.php', 'grant_type' => 'authorization_code', 'client_secret' => 'S6Z8Q~zae4D8k0mpbCtgAQrAUV5we.FxcR6LHav-' ))); $result = curl_exec($cRequest); $obj_token = json_decode($result); $token_get = $obj_token->access_token; echo $result; $refresh_token = $obj_token->refresh_token; array_push($array, $token_get); array_push($array, $refresh_token); curl_close($cRequest); return $array; } ?>