mark_s Posted November 18, 2006 Share Posted November 18, 2006 hi,it is possible to get the complete http request which was send by the user's browser to view a page? I want that the script shows the user which http request the browser has send to open the page. Link to comment https://forums.phpfreaks.com/topic/27686-how-to-get-full-http-request-header/ Share on other sites More sharing options...
printf Posted November 18, 2006 Share Posted November 18, 2006 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 Link to comment https://forums.phpfreaks.com/topic/27686-how-to-get-full-http-request-header/#findComment-126656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.