<?php
include '../db_api.php';
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');

$url="https://".$_SERVER['HTTP_HOST']."/api/user/profile";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$headers = array(
   "X-Api-Key: ".$_GET['X-Api-Key'],
   "X-Token: ".$_GET['X-Token'],
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

$resp = curl_exec($curl);
curl_close($curl);

$re= json_decode($resp, true);

$re= json_decode($resp, true);

if ($re['status']==1){
	
	echo 'OK';
}

?>