| View previous topic :: View next topic |
| Author |
Message |
droolin Halfop

Joined: 24 Jul 2003 Posts: 64
|
Posted: Mon Sep 17, 2007 8:30 pm Post subject: What exactly does this mean???? |
|
|
I have a line of code that I borrowed from another script to read the 7.html page from shoutcast.
| Code: | puts -nonewline $lcl_StreamWebPageScoket "GET /7.html HTTP/1.1\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-sh
ockwave-flash, */*\nAccept-Language: en-us\nAccept-Encoding: gzip, deflate\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; (R1 1.3); .NE
T CLR 1.0.3705; .NET CLR 1.1.4322)\nHost: www.awesomechat.net\nConnection: Keep-Alive\n\n" |
But I have no idea what it means other then it puts a line as if it was a browser???? But, the rest of that stuff???? I have no idea.
Can anyone explain to me why this would be done like this?
Dan |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Sep 17, 2007 11:57 pm Post subject: |
|
|
Thats the older method using the tcl socket code to retrieve webpages manually. Obviously the person who wrote the original script knew exactly what they needed to access a particular webpage in this way..Most(?) of us nowdays use the tcl http package, because it simplifies things a bit especially with more complicated web pages requiring queries and such.
The Accept- lines are http header directives. Refer to the relevant htt-protocol specs, eg:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|