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

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -