Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Users might experience few discrepancies in Search results. We are working on this on our side. We apologize for the inconvenience it may have caused.
New Member

TCL Scripting help needed

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 192.168.100.1 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:

OUTPUT:

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?

Thanks

1 REPLY

Re: TCL Scripting help needed

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

107
Views
0
Helpful
1
Replies
CreatePlease to create content