I want to parse some html in C. How can I read the source code of a website to stdin? I would like to redirect it from the command line if thats possible.
reading data from a website?
Started by ClemsonCS, Feb 19 2008 06:12 PM
8 replies to this topic
#1
Posted 19 February 2008 - 06:12 PM
|
|
|
#2
Posted 19 February 2008 - 06:53 PM
First word, libcCurl.
Second word, google!
Second word, google!
#3
Posted 19 February 2008 - 07:14 PM
I tried google before but couldnt find anything because I didnt really know what to search. I will try that keyword though! thanks
#4
Posted 20 February 2008 - 07:01 AM
You could also create a Socket on port 80 and send a raw request to the website in question - you'd be doing a bit of reinventing the wheel on the one hand, but you might learn more about why and how things work if you do. Also you may not need all of the stuff in libcurl. Anyway, it's an option.
#5
Posted 20 February 2008 - 10:26 AM
libcurl can be recompiled with many, many flags to limit what gets compiled if you are size-wary. But even then, its tiny, nothing.
#6
Posted 23 February 2008 - 10:21 AM
I found some links for you. If you're unfamiliar with socket programming, check out the socket tutorial first.
BSD Sockets: A Quick And Dirty Primer
HTTP Made Really Easy <--this is what you want
BSD Sockets: A Quick And Dirty Primer
HTTP Made Really Easy <--this is what you want
#7
Posted 23 February 2008 - 11:43 PM
#8
Posted 24 February 2008 - 08:19 AM
I just completed a full-on website script, completely re-invented the wheel. I'm telling you, it's worth it. You learn a lot.
#9
Posted 24 February 2008 - 09:26 AM
Alright when I have some free time Ill learn socket programming. It looks pretty advanced for me since I am only a freshman in comp sci but i guess ill have to learn it eventually.


Sign In
Create Account


Back to top









