dim CR$(3) dim tcp1$(40) dim tcpk1$(300) CR$ = CHR$(13)+CHR$(10) tcp1$ = "TCP:123.123.123.123:80" 'connection string to server 'build tcp header for GET request to datanab server. tcpk1$ = "GET /index.htm HTTP/1.0" + CR$ tcpk1$ = tcpk1$ + "Accept: text/html, */*" + CR$ tcpk1$ = tcpk1$ + "Accept-Encoding: gzip, compress" + CR$ tcpk1$ = tcpk1$ + "Accept-Language: en" + CR$ tcpk1$ = tcpk1$ + "Content-type: application/x-www-form-urlencoded" + CR$ syslog "packet to be sent is:" + CR$ syslog tcpk1$ 'open socket, send packet, wait for response, and close socket. 15 Open tcp1$ as 0 18 If connected(0) Then syslog "connected" Write 0,tcpk1$,0 goto 20 else goto 18 endif 20 Read 0,tin$,1000 if len(tin$) > 0 then syslog tin$ goto 20 endif Close 0 END