So I\'m trying to parse an incoming request in PHP which has the following header set:
Authorization: Custom Username
Simple question: how
For token based auth:
$token = null; $headers = apache_request_headers(); if(isset($headers['Authorization'])){ $matches = array(); preg_match('/Token token="(.*)"/', $headers['Authorization'], $matches); if(isset($matches[1])){ $token = $matches[1]; } }