$token = $user['token'];
if (isset($_POST['date'])) {
$ch = curl_init('https://someserver.ru/');
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Content-Type: application/json',
'Authorization: bearer TOKEN1',
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
$json = json_decode($result, true);