We used something like this for our picture archiving program for AP Computer Science class (it basically searches a directory for specified picture files and archives them. It also inputs internet pictures, with link validating. Lastly, it can output the pictures in random slideshow format)... It was me and another person's final project...
http://personalpages.tds.net/~nadke/archiver.zip
That's the program, source included. You need the HTTP.h file...
Then the commands you should be able to look at the source in archiver.cpp. It's the linkchecker() function. Just replace the apstring types with c string types. Actually, that's what it's doing...
Code:
apstring temp = archive[i].locout();
const char* url = temp.c_str();
and the rest of the function uses "url" (to stay compatible from that APSTRING crap).