Jump to content

Reading a webpage

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
Macoder

Macoder

    Learning Programmer

  • Members
  • PipPipPip
  • 39 posts
I want to figure out how to read a webpage. (as plain text) I'm not downloading anything, or displaying pictures, just finding out what's on the webpage. Is there some easy function in some library that does that with just the webpage as the argument? I've been looking around, and I found curl, but I can't get it to build to a framework. Does anyone have a good library for this?

#2
TheSourceOfX

TheSourceOfX

    Learning Programmer

  • Members
  • PipPipPip
  • 45 posts
I apologize if this sounds insincere, but I just want to cover everything; are you talking about getting the source of the web page, and if so, is it not sufficient to just right click on the page and select "View Source" from the popup menu? In other worrds, do you need this to be an input to a program given any web page or do you just need to obtain the source code for some particular page?

-TheSourceOfX

#3
Macoder

Macoder

    Learning Programmer

  • Members
  • PipPipPip
  • 39 posts
I want it to put what's in "View source" in a variable for a webpage I say in the program, so yes, it would be input.

#4
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
This is perfect for libcURL. Go and download it, and if you're using C++ get the C++ bindings as well. That should be exactly what you need.
Wow I changed my sig!

#5
Macoder

Macoder

    Learning Programmer

  • Members
  • PipPipPip
  • 39 posts

ZekeDragon said:

This is perfect for libcURL. Go and download it, and if you're using C++ get the C++ bindings as well. That should be exactly what you need.

Macoder said:

I've been looking around, and I found curl, but I can't get it to build to a framework.

Do you know how to build it to a .framework file??

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
You can also use socket programming with HTTP, if you want to learn how the libraries work. I can help you with that if you like.
sudo rm -rf /

#7
carly

carly

    Learning Programmer

  • Members
  • PipPipPip
  • 34 posts
On Windows, just use Win32 Net apis : 1 line of code...

#8
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
Do you mean the WinHTTP APIs? Definitely not one line of code.
sudo rm -rf /