http headers

Links for php scripts

Moderators: macek, egami, gesf

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

http headers

Postby ruturajv » Fri Sep 12, 2003 4:26 am

I want a script which can see all the headers of the page

I tried the apache_request_headers but that didn't return
HTTP/1.1 200 OK
and that is what i actually want...

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Re: http headers

Postby swirlee » Fri Sep 12, 2003 9:09 am

ruturajv wrote:I tried the apache_request_headers but that didn't return
HTTP/1.1 200 OK
and that is what i actually want...


HTTP/1.1 200 OK isn't a request header, it's a response header. So it makes sense that apache_request_headers() wouldn't return it, huh? Just use sockets to connect to the server, request the file, and then read what's returned. The first few lines are the headers. Read up on the HTTP protocol for more details, but this is pretty simple. Hell, you can do it from telnet (or a decent browser like Firebird) if you want to skip PHP altogether.


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron