I am trying to access 2 headers on google app engine
X-AppEngine-Country
and
X-AppEngine-City
what i was trying to do is to useing $_REQUEST for example :
$_REQUEST["X-AppEngine-Country"] $_REQUEST["X-AppEngine-City"]
and still not getting any data .
how can i access this headers ?
should i change values on the yaml file?
important : i am using php on google app engine
Advertisement
Answer
You should use $_SERVER["HTTP_X_APPENGINE_COUNTRY"]
and $_SERVER["HTTP_X_APPENGINE_CITY"]
instead.
See https://cloud.google.com/appengine/docs/standard/php7/reference/request-response-headers#app_engine-specific_headers for additional fields.
The specific $_SERVER
additions are listed here https://cloud.google.com/appengine/docs/standard/php7/runtime#special_server_keys