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

Recommended Answers

All 5 Replies

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/

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

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

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 :) ...

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 .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.