This is a short socket script that generates a random movie for you to watch.
Example:
[21:31] <@synthtech> ^watch
[21:31] <@HAL> You should watch Natural Born Killers (1994)
on *:TEXT:^watch:#: {
if ($sock(wmtw)) sockclose wmtw
sockopen wmtw www.whichmovietowatch.com 80
sockmark wmtw msg #
}
on *:sockopen:wmtw: {
sockwrite -nt $sockname GET /light/pick.php HTTP/1.1
sockwrite -nt $sockname Host: $+($sock(wmtw).addr,$str($crlf,2))
}
on *:sockread:wmtw: {
var %wmtw | sockread %wmtw
if ($regex(%wmtw,/<h3>(.+)<\/h3>/)) {
$sock(wmtw).mark You should watch $regml(1)
sockclose wmtw
}
}
change the line 7 :
sockwrite -nt $sockname GET /light/pick.php HTTP/1.1