LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   read html files from C/C++ (https://www.linuxquestions.org/questions/programming-9/read-html-files-from-c-c-115571/)

jpc82 11-13-2003 09:42 AM

read html files from C/C++
 
I desided to try writing an movie query library from scratch, but I just have one question.

Is there a C/C++ command that will allow you to open an html file from the web as if it was a file?

I want to be able you use basic file.getline()'s to read the file, and then parse it line by line.

Thanks,

Kurt M. Weber 11-13-2003 02:28 PM

C/C++ do not have commands...

To get the file, though, why not just system() or exec() 'wget', have it get the file and store it in a known location, then open that file and go from there?

jpc82 11-13-2003 10:12 PM

That was my last resort since I will probably be needing to get multipe files at the same time, and many will have the same name. I was just hoping for an easier way of doing it

kev82 11-14-2003 10:44 AM

i remember reading about a library that allows you to treat urls as normal files, i think its libcurl but not sure

Kurt M. Weber 11-14-2003 05:27 PM

Yeah, it's curl. I had forgotten about it until this morning...shame on m!

jpc82 11-16-2003 04:01 PM

Thanks, I'll look into the library


All times are GMT -5. The time now is 09:53 PM.