i'm trying to check if the file exists, problem is it says the 404 error message like 30 times. Sometimes it says 404 even tho 404 isn't in %temp. The %site and %url and %file are all right %site is like www.site.com %url is like /pics/pic.jpg %file would be pic.jpg so what am i doing wrong? the http:// the webpage put in not me



on *:SOCKOPEN:cnb: {
echo -s *** $sockname was just opened, Retrieving file %file
sockwrite -n $sockname GET / $+ %url HTTP/1.1
sockwrite -n $sockname Host: $+ %site
sockwrite -n $sockname Connection: Keep-Alive
sockwrite $sockname $crlf

}

on *:SOCKCLOSE:cnb: {
echo -s *** $sockname just closed
}

on *:SOCKREAD:cnb: {
sockread %temp
if (404 isin %temp) msg $chan %file not found
if (302 isin %temp) msg $chan %file has been moved
if (301 isin %temp) msg $chan %file moved permanently
}