Skip to main content
GameDev.net gamedev.net
🔒 Locked

accessing a web page through a program

Started by moucard Jan 14, 2005 at 4:10 PM 2 replies 750+ views
Original Post
moucard
moucard
Hi to every one. This might be a little off topic, but I'd like some pointers on what I should use to create an application that will get a web page, follow a specific link in there, and then get some info from the new page. I'll be using VStudio .NET 2003. I'd like to know what technologies are relevant, e.g. Web Services? I remember using a component in VB that I could get an html page. I guess I'm looking for something similar. The page I'll be getting is .asp if that matters.
Sam Gamgee
Sam Gamgee
Well, you can use WinSock. Just open a connection to the IP Address of the webserver over port 80 and send the following: "GET /page.html HTTP/1.0\n\n" (without the quotes of course).

I know in Visual C# 2005, there is a special "Web Browser" object that allows you to input the URL and it will handle everything. There is a free Beta version of this compiler at MSDN (I think it's still up anyway).

Hope that helped a little,
Walter
mrbastard
mrbastard
do you want to display the page or just rip some data from it?
[size="1"]
moucard
moucard
Actually I've found the solution up to a point. I googled and came up with HttpWebRequest/Response (sound familiar from asp!). I think I only need to rip data from the page. The program will be for a friend. He hasn't provided me with much information yet, but I wanted to remember how I could get a web page. http://www.csharp-station.com/HowTo/HttpWebFetch.aspx has a good example.
In the initial conversation I had with my friend she stated that the problem was that from the site's main page, they clicked a link and it created some temporary page. So if they put the same url the next time nothing came up. So we have to do it by going through the main page and following the link.
My thinking right now is, get the main page, parse it, find the link, make a new request response and I think that would get me the web page we need. I'll post again probably tomorrow if I need further assistance, but if you think I should know something before hand feel free to post. Thanks for your help guys :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.