json - How to include X-Auth-Token from api in php -
i want load json data api php page. dont know how include authorization. able see data in postman. authorization included in header key: x-auth-token , value '41e509a....'. if manually copy data .json file, doesnt require authorization, im able load data fine.
how include authorization in code? current code:
$url = 'https://urlhere'; $data = file_get_contents($url); $result = json_decode($url); echo $result;
Comments
Post a Comment