Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

How To Retrieve Image Or Data On A Webpage ?

Recommended Posts

Hi everyone !I need my little program to access internet web page, then find some data in it. I need to manipulate that data and to show the information to the user interface program.I am searching for a way to implement this, but I didn't find anything. Is there any tutorial or anything about this ?I really need that information. I have to finish this application as soon as possible, and it's kinda "urgent" if I can say.If you know anything about this, please help me !Thank You very much for your help !

Share this post


Link to post
Share on other sites

Hi kvarnerexpress,I dont know exactly how you do it in C/C++ but in Java you can proceed as follows:Create a socket and connect to google using port 80 for HTTP.Search using the search string in the url.something like google.com?search=.... (dont remember)Or may be u can use the google API's that are available.. I am not sure this is the solution but just a hint for you to proceed...I think there are sockets in C++ too.. so may be you can use them...I posted here whatever vague idea I got. If it was of any help to you, I would be glad.btw do post here when you get the solution. it might help someone else.Cheers.

Share this post


Link to post
Share on other sites

Do you know anything about socket programming? There good examples floating around, but basically, you need to initialize a socket, connect to the server, and receive the data in streams.

To receive data from a socket connection, use something like:

int recvd = 1;while( recvd > 0 ) {  recvd = recv(the_socket,the_buffer,the_chunk_size,0);  /* Where:       the_socket = pointer to an initialized socket;       the_buffer = preferably char type array for storing received data;       the_chunk_size = how much data to receive in bytes.      Once recvd = 0, it is assumed that all data has been received.  */}

Obviously not the best option, but I think it should work. As for manipulating the data, what exactly do you want to do with it?
Edited by Spectre (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.