mIRC Home    About    Download    Register    News    Help

Print Thread
Help with sockets #16400 22/03/03 11:39 AM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
I have this test socket:

alias update {
sockclose script.update
sockopen script.update www.home.no 80
}

on *:sockopen:script.update:{
sockwrite -n $sockname GET /knappen/version.txt HTTP/1.1
sockwrite -n $sockname Host: www.home.no
sockwrite -n $sockname $crlf
}

on *:sockread:script.update:{
var %ver
sockread %ver
tokenize 32 %ver
if (%ver) { echo -a %ver }
}

This is just a simple test for me to learn how to make a socket update... But when i try it it echoes:

HTTP/1.1 200 OK
Date: Sat, 22 Mar 2003 11:34:37 GMT
Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g
Last-Modified: Sun, 09 Mar 2003 16:35:16 GMT
ETag: "e2c098-4-b402d900"
Accept-Ranges: bytes
Content-Length: 4
Content-Type: text/plain; charset=ISO-8859-1

What is wrong? It should return v1.0 . I`ve placed a text file on my site that only contains v1.0.. But why doesn`t it echo that out?

Thanx for any help!

Re: Help with sockets #16401 23/03/03 12:25 AM
Joined: Mar 2003
Posts: 6
E
emil Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2003
Posts: 6
Siden finnes ikke, står det i min IE. For det første må du huske at etter infoen serveren returnerer sender den en "enter" tilbake. Chr13 tror jeg.


All typos are intentional.
Re: Help with sockets #16402 23/03/03 03:43 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Uhhhhh.....WHAT!?

Try posting in english....some of us here have no idea what the hell you are saying...

Re: Help with sockets #16403 23/03/03 06:12 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
He wasn`t saying anything important...
i still don`t get why this socket doesn`t return the content (v1.0) of the txt file... Any one have any idea??