1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
alias testing {
;if the socket already is open, close it, you can only have one connection with the same name at the same time
if ($sock(testing)) { sockclose testing }
sockopen testing localhost 80
}
on *:sockopen:testing:{
sockwrite -n $sockname GET /xampp/Inte-klara/webspell/test.php HTTP/1.0
sockwrite -n $sockname Host: localhost
sockwrite -n $sockname user-agent: Mozilla/??
sockwrite -n $sockname Connection: Keep-Alive
sockwrite -n $sockname $crlf
}
on 1:sockread:testing:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = -
echo -a %temp
goto nextread
}
|