egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What exactly does this mean????

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
droolin
Halfop


Joined: 24 Jul 2003
Posts: 64

PostPosted: Mon Sep 17, 2007 8:30 pm    Post subject: What exactly does this mean???? Reply with quote

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
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Sep 17, 2007 11:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber