Food Porn Daily

By hxck
Platform:  mIRC
Published  Feb 24, 2012
Updated  Feb 24, 2012
Gets the image of the day from http://foodporndaily.com.

(04:03:22 am) !fp
(04:03:24 am) FoodPornDaily for Friday February 24: http://foodporndaily.com/pictures/rich-braised-country-style-pork-ribs-with-cippolini-onions-bay-leaves-and-lemon-zest-over-creamy-polenta.jpg on $*:TEXT:/^!fp$/Si:#: {
if ($sock(foodporn)) sockclose foodporn
sockopen foodporn foodporndaily.com 80
sockmark foodporn msg #
}

on *:SOCKOPEN:foodporn: {
sockwrite -n $sockname GET / HTTP/1.1
sockwrite -n $sockname Host: foodporndaily.com
sockwrite -n $sockname Connection: close
sockwrite -n $sockname $crlf
}

on *:SOCKREAD:foodporn: {
if ($sockerr) { $sock(foodporn).mark Socket Error: $sock(foodporn).wsmsg }
var %fptemp
sockread %fptemp

if (<img id="mainPhoto" isin %fptemp) { set %pic $remove($gettok(%fptemp,4,32),src=,") }
}

on *:SOCKCLOSE:foodporn: {
if ($day == %lday) {
$sock(foodporn).mark Check back tomorrow!
}
else {
set %lday $day
$sock(foodporn).mark FoodPornDaily for $date(dddd mmmm dd) $+ : %pic
}
}

Comments

Sign in to comment.
ulquiorra4   -  Feb 25, 2012
lol x)
 Respond  
chachin   -  Feb 25, 2012
someone needs to make this for EGGDROP bot
 Respond  
SalvadorCampos   -  Feb 24, 2012
waaaaa cool !!!!!
 Respond  
MashhitDK   -  Feb 24, 2012
LoL... haven't tested... but iLike it
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.