This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

HTTP Headers

Old posts that have not been replied to for several years.
Locked
u
uTc

Post by uTc »

How can i find out what HTTP Headers are posted to a site because i need to put them in a script because the script is returning the website in currency $ and timezone GMT but on my browser its returning correctly currency £ and timezone GMT i guess the first one is just its default if no headers are posted and how do i put it in a script?
something like:

puts $sock "GET $url/ HTTP/1.0
nConnection: Keep-Alive
nUser-Agent: Mozilla/4.61 [en] (X11; I; Linux 2.2.13 i586; Nav)
nPragma: no-cache
nAccept: image/gif, iimage/jpeg, image/pjpeg, image/png, */*
nAccept-Encoding: gzip
nAccept-Language: en-uk
nAccept-Charset: iso-8859-1,*,utf-1
nContent-type: application/x-www-form-urlencodedn"

allthough that doesn't work


Thanks./

<font size=-1>[ This Message was edited by: utc on 2002-03-19 11:00 ]</font>
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

You could write a little script to capture the output your web browser sends when you try to connect to yourself.

Code: Select all

socket -server on_connect 12345
proc on_connect {chan addr port} {
  while {[gets $chan line] > 0} {
    puts "client said: $line"
  }
  close $chan
}
vwait hi
Just type that in using tclsh, then connect to http://localhost:12345 (or where you're running it) in your browser.

If the "vwait hi" line gives you an error, then type "update" after you try connecting.
u
uTc

Post by uTc »

Thanks stdragon :smile:
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Your might also find that the "Accept-language" is wrong.

It should infect be "en-gb"
Locked