file_get_contents stores data in an array can be handy and doesnt require all the fopen crap link directly to file its saved as a useable array no need to close connections etc. You can always use @file_get_contents to cut the error msgs but at this stage of your development I would leave the @ off.
heres my code for grabbing the image file needed.
You must first be a
registered member to view any code.
then once all my other vars are set too I check that $ign['img] is set and if it is I do the following:
You must first be a
registered member to view any code.
then i call my add to dbase function (ign because I originally planned to do it with ign)
and that does this
You must first be a
registered member to view any code.
Most of this code is now obsolete because my pre bot does it for me. This code is only used if release is above 24hrs old and no data has been stored but thats another story

I almost released it a few days ago and then saw your progress so didnt bother.