ich versuch schon seit ner ganzen Weile eine einfach Website auszulesen. Ich habe es schon mit x-verschiedenen Scripten aus google etc. versucht nur komischerweise ging keins.
Mit dem Script unten hatte ich bis jetzt den größten Erfolg denn mein Eggdrop hat mir sogar schon geantwortet, leider nicht viel
[Quote] Fehler: couldn't open socket: host is unreachable [/Qoute]
Meiner Meinung nach liegt es am Http oder was sagt ihr dazu?
Lg
schteff
Code: Alles auswählen
bind pub - !test pub:lan:info
proc pub:lan:info {nick host hand chan text} {
if {[catch {set sock [socket -async http://programixave.pr.funpic.de 80]} error]} {
puthelp "PRIVMSG $chan :Fehler: $error"
} else {
fconfigure $sock -blocking 0 -buffering line
fileevent $sock readable "pub:lan:info:answer $sock $chan"
puts $sock "GET /test.php HTTP/1.1"
puts $sock "Host: http://programixave.pr.funpic.de"
puts $sock "Connection: Keep-Alive"
puts $sock ""
flush $sock
}
}
proc pub:lan:info:answer {sock chan} {
set answer "[split [read $sock] \n]"
foreach line $answer {
if {[string match "Das*" $line]} {
puthelp "PRIVMSG $chan :$line"
}
}
if {[eof $sock]} {
close $sock
}
}