cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
255
Views
0
Helpful
1
Replies

TCL Scripting help needed

CCampbell_2
Level 1
Level 1

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 1

thisisshanky
Level 11
Level 11

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: