473,388 Members | 1,198 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Viewing Entire HTTP Header ?


hello!

is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the apache
functions, but none seem to have a way to show the body that was sent with
the request.

any suggestions for how i would go about doing this? It's mostly for
documentation and instructional purposes, but i'd like to see the results
without having to construct them by hand and telnet'ing into port 80 all
the time ....

thanks.
mark.
--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #1
8 2037
Mark wrote:
is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the
apache functions, but none seem to have a way to show the body that
was sent with the request.

any suggestions for how i would go about doing this? It's mostly
for
documentation and instructional purposes, but i'd like to see the
results without having to construct them by hand and telnet'ing into
port 80 all the time ....


http://www.php.net/get_all_headers

Never used it myself and looks like it only works with Apache (and
Netscape/iPlanet/SunONE from 4.3.3) and then only when compiled as a
module (ie not a CGI).

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Jul 17 '05 #2
This is not an in code solution, but if you want to see the headers that
were sent to your client, I suggest a proxy debugger like Charles:
http://www.xk72.com/charles/. One of those "how did I ever live without it"
dev tools.

- Kevin
"Mark" <mw@ANGRYLanfear.com> wrote in message
news:ic********************@nventure.com...

hello!

is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the apache
functions, but none seem to have a way to show the body that was sent with
the request.

any suggestions for how i would go about doing this? It's mostly for
documentation and instructional purposes, but i'd like to see the results
without having to construct them by hand and telnet'ing into port 80 all
the time ....

thanks.
mark.
--
I am not an ANGRY man. Remove the rage from my email to reply.

Jul 17 '05 #3
To see all headers being sent to your browers get firefox and the httpheaders
plugin. It displays everything in a nice window for you.

db

An noise sounding like Mark said:

hello!

is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the apache
functions, but none seem to have a way to show the body that was sent with
the request.

any suggestions for how i would go about doing this? It's mostly for
documentation and instructional purposes, but i'd like to see the results
without having to construct them by hand and telnet'ing into port 80 all
the time ....

thanks.
mark.

--

/(bb|[^b]{2})/
Trees with square roots don't have very natural logs.

Jul 17 '05 #4
David Gillen wrote:
To see all headers being sent to your browers get firefox and the
httpheaders plugin. It displays everything in a nice window for you.

db


i only found an unsigned extension called livehttpheaders, but it seems to
do the trick. will just hope it's safe to use.

most excellent. thank you sirrah!

mark.


--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #5
Chris Hope wrote:

http://www.php.net/get_all_headers


doesn't seem to exist in PHP5. There is a function called
apache_request_headers but ....

it only returns the actual headers, NOT the message body as well.

and looking at my question, that means i didn't quite ask it right, but i
want to see the entire HTTP request.

there does not appear to be a way to do this from with PHP yet ...

d'oh!

thanks,
mark.


--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #6

"Mark" <mw@ANGRYLanfear.com> wrote in message
news:ic********************@nventure.com...

hello!

is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the apache
functions, but none seem to have a way to show the body that was sent with
the request.

any suggestions for how i would go about doing this? It's mostly for
documentation and instructional purposes, but i'd like to see the results
without having to construct them by hand and telnet'ing into port 80 all
the time ....

thanks.
mark.
--
I am not an ANGRY man. Remove the rage from my email to reply.


file_get_contents("php://input") will give you the body of the request.
Jul 17 '05 #7
Chung Leong wrote:

"Mark" <mw@ANGRYLanfear.com> wrote in message
news:ic********************@nventure.com...

hello!

is there a way in code to view the entire HTTP Header? Many of the
variables in $_SERVER have much of the header, as do some of the apache
functions, but none seem to have a way to show the body that was sent
with the request.

any suggestions for how i would go about doing this? It's mostly for
documentation and instructional purposes, but i'd like to see the results
without having to construct them by hand and telnet'ing into port 80 all
the time ....

thanks.
mark.
--
I am not an ANGRY man. Remove the rage from my email to reply.


file_get_contents("php://input") will give you the body of the request.


wicked!

is this a documented/supported feature, or just a debugging hack?

domo.

mark.


--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #8
Mark wrote:
Chung Leong wrote:

"Mark" <mw@ANGRYLanfear.com> wrote in message

file_get_contents("php://input") will give you the body of the request.

wicked!

is this a documented/supported feature, or just a debugging hack?


It's documented here: http://us3.php.net/manual/en/wrappers.php.php
There are several php:// urls used to access the input and output
streams from PHP. php://input is used to access the body of a POST
request. The variable $HTTP_RAW_POST_DATA could be used aswell.
Jul 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: fartsniff | last post by:
Hello all, Been playing around with capturing the entire URL. I dont have any problems if it a file, i.e. http://www.mydomain.com/somefile.php, I am running into problems with this,...
2
by: Plex | last post by:
Ok, I've written this script which is supposed to take an image uploaded by a user and put it in to a database, then at a later date be able to extract the image from the database and display the...
4
by: Tom | last post by:
My site requires users to log in. Each php page ensures the user has been authentiated and will redirect to the login page if need be. However the site also has a directory of PDF files that...
14
by: Brian Maupin | last post by:
I have a refreshing webcam shot on my site and I was wondering if there was a way I could display how many people are currently viewing it? Thanks in advance.
6
by: - jes | last post by:
Greetings. Using CSS, a programmer can set the color for an href link and a different color for a VISITED href link. Anyone know where this "list" of visited links is stored? Is it...
10
by: NH | last post by:
I have a girdview with paging enabled. How can I add a message in the footer to say "Viewing records 1-15 of 45" etc Thanks
5
by: axsprog | last post by:
I am quite skilled with Access, VBQ, ADo, etc. but to I can no longer ignore the demands from clients to provide WEB enabled forms for their data - so hence I have begun to develop DAP's for some....
10
by: Allan Ebdrup | last post by:
I have a custom server web control that inserts another custom web server control in a templated child control (a wisard that inserts a header in its wizardstep) Now after switching to design view...
1
by: sberry | last post by:
I have an image proxy script I use to retrieve images from a remote server and store locally on the first request. On the second request (and all requests after) the image is returned from the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.