mIRC Homepage

Help with sockets

Posted By: Knappen

Help with sockets - 22/03/03 11:39 AM

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!
Posted By: emil

Re: Help with sockets - 23/03/03 12:25 AM

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.
Posted By: The_Game

Re: Help with sockets - 23/03/03 03:43 AM

Uhhhhh.....WHAT!?

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

Re: Help with sockets - 23/03/03 06:12 PM

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??
© 2020 mIRC Discussion Forums