Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   C And Html (http://www.programmingforums.org/showthread.php?t=917)

goldenb0y Oct 20th, 2004 2:46 PM

What's the best way to go about checking a HTML website and gather data from it ina C program? I am having a bit of trouble with Google do to the common string "HTML" :( Thanks alot!

Daggerhex_Flynn Oct 20th, 2004 4:46 PM

You can search a text file and find all of the URL's and stuff like that, but there is no library in Standard C that involves web programming facilities. Maybe try C in conjunction with Python or Perl. I think that Perl is probably the best language to use for this type of program.

kurifu Oct 20th, 2004 5:10 PM

You can get CURL for C, which will connect to a server for you... intiate a request and retreive data from a variety of resource types, including HTTP and HTTPS.

From that point you would need to find another library to process the HTML, you can likely find a few DOM (Document Object Model) HTML parsers out there.

The other object is that you can embed an MSIE AtciveX control into your application (Has to be window gui based though) and set the control to hidden if you do not want it to be seen. Send the request and once the request is complete use one of its many COM interfaces to extract the code. I have done this before myself (only likely not for the same purpose, and my controls were not hidden) so I know for fact that it is possible.

goldenb0y Oct 20th, 2004 7:54 PM

Problem solved thanks guys ;)

http://curl.haxx.se/libcurl/c/


All times are GMT -5. The time now is 5:13 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC