1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
alias tran {
set %ett $1
sockopen TRANS www4.travlang.com 80
}
on *:sockopen:TRANS:{
sockwrite -n $sockname GET /trav_spVert.php?teVertalen= $+ %ett $+ &bronTaal=eng&doelTaal=spa HTTP/1.1
sockwrite -n $sockname Host: www4.travlang.com
sockwrite -n $sockname Connection: Keep-Alive
sockwrite -n $sockname $crlf
; echo -a tvo
}
on *:sockread:TRANS:{
if ($sockerr > 0) return
:HEJ
sockread %trans
if ($sockbr == 0) return
if (%trans == $null) %trans = -
if (<tr><td>Swedish isin %trans) {
echo 4 %trans
sockclose TRANS
set %sock 0
halt
}
else {
if (%sock > 500) {
echo 4 sock is above 500, halting
sockclose TRANS
set %sock 0
halt
}
else {
inc %sock
GOTO HEJ
}
}
} |