USDoD14 0 Newbie Poster

I've been looking everywhere for samples, examples, and help for this, but I've not been that successful. I want to open an image <www.silentnoobs.com/renders/pb000495.png> and read the first few lines and output it correctly. There's a ton of jibberjabber in there.

Here is the first ~100 or so characters in the .png file.

‰PNG

   
IHDR  ~  .   ŸÔˆ]   àtEXtcomment PunkBuster Screenshot (±) AAO  Pipeline
9780628 67.214.176.119:1716 ÿ€The ÿSilent ÿNoobsÿÿ Now Recruiting!
*?* [SN^^]Wait4Dark-LS
Attempted: w=790 X h=394 at (x=50%,y=50%)
Resulting: w=394 X h=196 sample=2
ÁÆ! ïIDATxœì½G–ëÈ–®N€Ð‚µ>'âfæZo½¼ÑÔª[Ó¨éÔ0ªYílUe3;µ…Ù¶mt?!è
‡]»0‚púq~ø·üíÿXÆ2–±Œe,c¿áÿ—±Œe,cËXÆEÆ‚Þe,cËXÆ2.:ô.cËXÆ2–qѱ wËXÆ2–±Œ‹Ž½ËXÆ2–±Œe\t,è]Æ2–±Œe,ã¢cAï2–±Œe,cz—±Œe,c˸èXлŒe,cËXÆEÇ‚ÞK<Ûò̲M‘gy¾

Output as:

PunkBuster Screenshot (±) AAO  Pipeline
9780628 67.214.176.119:1716 ÿ€The ÿSilent ÿNoobsÿÿ Now Recruiting!
*?* [SN^^]Wait4Dark-LS
Attempted: w=790 X h=394 at (x=50%,y=50%)
Resulting: w=394 X h=196 sample=2

At line #3 in the second code snippet, there may be a 32 digit alpha-numeric sequence between the aserisks that sometimes isn't in there. As you can see, this is part of a punkbuster screenshot for Americas Army.

The purpose of this is to be able to input a .png file into a form (via a http link), and it output something similar to the second code snippet. Then it saves the image into a directory, renamed to the first numeric sequence in line #2 of snippet 2.

If I am able to get that finished, I will then want to have it store the info (the lines in snippet #2) into a mySQL database, as well as the link to the image file. Then I'd be able to make search queries to search for each thing (32 digit sequence, player name, server IP, etc).

But, I just need some guidance to how I could get this accomplished.