TCL Scripting help needed

Unanswered Question
Jun 6th, 2007

Hi guys, okay, so this isn't telephony related but judging from the search I just did, there are more people in the VoIP groups with tcl scripting experience than in the wan/lan group where this probably belongs.

So what I'm trying to do is have my router use Tcl to pull down a webpage from a cable modem.

Here's my code so far.

set sock [socket 80]

puts $sock "GET /signaldata.htm HTTP/1.0\n\n"

flush $sock

set result [ gets $sock ]

puts stdout "OUTPUT:\n$result"

set exit_msg "closing socket"

close $sock

It doesn't work. All I get is:


I know the URL works because I can pull it up fine from my browser and a telnet to port 80 from the router itself also opens the socket for a brief moment.

Can anyone tell me what I'm doing wrong?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
thisisshanky Wed, 06/06/2007 - 16:51

Good idea to re-post this in Developers forum. You may get better response.


This Discussion