curl - How do I get custom headers with PHP 5.5 -
curl - How do I get custom headers with PHP 5.5 -
im using php 5.5 on wamp. ahve very simple api. want read request headers request. i'm printing out headers:
foreach ($_server $name => $value) { echo "name ".$name." , value ".$value."...."; }
i request via curl:
curl -i -h "accept: application/json" -h "content-type: application/json" -h "api_key: hv7vgd4jsbb" -h "device_id: 63843" http://localhost/schoolspace.me/device_api/project/beaufort
as can see there 2 custom request headers api_key , device_id. not appear in output since upgrading php 5.5 (i content-type , take headers fine).
i've done years , never had issues.
how custom headers php 5.5?
php curl
Comments
Post a Comment