qr_id route php getDog
This commit is contained in:
23
php/php-dog/session.php
Normal file
23
php/php-dog/session.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Headers: access");
|
||||
header("Access-Control-Allow-Methods: GET");
|
||||
header("Content-Type: application/json; charset=UTF-8");
|
||||
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
|
||||
|
||||
session_start();
|
||||
$return =
|
||||
[
|
||||
"success" => 0,
|
||||
"user" => null
|
||||
];
|
||||
|
||||
if (isset($_SESSION['user'])) {
|
||||
$return =
|
||||
[
|
||||
"success" => 1,
|
||||
"user" => $_SESSION['user']
|
||||
];
|
||||
}
|
||||
echo json_encode($return);
|
||||
?>
|
||||
Reference in New Issue
Block a user