954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Reading internet data using a C++ program

hey,

I want to read internet data through a C++ program. I am told that the way to do this is by using a proxy server and spitting out the data through the proxy to a file which then can be read.

How exactly do you setup a proxy server which preforms this task (i.e. all the internet data going through it is sent to a file). Can someone help me out or show me where to look to get the information.

Thanks

yazooney
Newbie Poster
14 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

what do you mean by 'read internet data' ? If it means making an HTTP 'get' request to some URL and getting the data that i think you can try using the 'curl' library http://curl.haxx.se/

Agni
Practically a Master Poster
655 posts since Dec 2007
Reputation Points: 431
Solved Threads: 116
 

Hmmm i dont think thats what i mean. I downloaded java program which has live stock prices updated second by second. The prices are updated via the program conncecting to the internet.

What I want to do is capture these prices from the program and store them within my own program. I spoke to someone who said one way of doing this is by routing the internet feed the program uses (not sure if this is the right terminology) through a proxy server and saving the data files sent to the program. If the program receivces the internet data via xml files then it can be possible to capture the prices from the data sent via the internet to the program which displays the data.

What I want to know is how do I set up and use a proxy to intercept the data files sent and then transfer the data to a file so it can be read?

Hope that clears it up

yazooney
Newbie Poster
14 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

Agni: the lib you are refering to, does it only work in linux or am i mistaken?

Bladtman242
Junior Poster
176 posts since Dec 2008
Reputation Points: 18
Solved Threads: 4
 
What I want to know is how do I set up and use a proxy to intercept the data files sent and then transfer the data to a file so it can be read?


Intercepting data, that's actually the base of a firewall :) ...

Edit:: The following post is maybe what you're looking for (if you're using Windows): http://www.daniweb.com/forums/post784786-3.html
Edit:: This thread might be also useful for you :) ...

tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
 

You could use a network sniffer , to see what packets and to where are being sent/recieved . And after ,try recreating the same in c++ using sockets .

jen140
Junior Poster
117 posts since Jan 2009
Reputation Points: 11
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You