Jump to content

how to get full http request header?


mark_s

Recommended Posts

Use the $_SERVER array to get what you want...

These will hold most everything in the request...

[REQUEST_METHOD]
[REQUEST_URI]
[HTTP_CONNECTION]
[HTTP_KEEP_ALIVE]
[HTTP_ACCEPT_CHARSET]
[HTTP_ACCEPT_ENCODING]
[HTTP_ACCEPT_LANGUAGE]
[HTTP_ACCEPT]
[HTTP_USER_AGENT]
[HTTP_HOST]

You should also include the [QUERY_STRING] as [REQUEST_URI] sometimes depending on the server does not contain the full request, it only contains the path. You can also use [ALL_HTTP] but it does not include request data, only data relating to the browser and to the server, so the URI and query sting will not be present...

printf

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.