You're lucky I still had this from when I showed someone else how to do this a long time ago. I didn't include much error checking, but this should give you an idea of how to do it. :P
Note, if you have an image file called "tempimage.gif" in your mIRC Directory, using this script will delete it.
alias dlimage {
sockopen dlimage www.google.com 80
if ($isfile(tempimage.gif)) { .remove tempimage.gif }
}
on *:sockopen:dlimage:{
var %% = sockwrite -n $sockname
%% GET /intl/en_ALL/images/logo.gif HTTP/1.0
%% Host: www.google.com
%%
}
on *:sockread:dlimage:{
var %s | sockread %s
while ($sockbr) {
if (!%s) {
; Image starts now.
sockrename dlimage tempimage
return
}
sockread %s
}
}
on *:sockread:tempimage:{
sockread &lol
bwrite tempimage.gif -1 -1 &lol
}
on *:sockclose:tempimage:{
window -p @tempimage
drawpic @tempimage 0 0 tempimage.gif
if ($isfile(tempimage.gif)) { .remove tempimage.gif }
}