How to retrieve data in a page from another website?
-
I'm developing a website where the user will navigate to one of my ASP pages and from there I will navigate to a page in another website. Once I receive the resulting HTML page from that site, I will extract some of the data from it and use it to generate my own page which is what will be seen by the user. This will all happen behind the scenes on the server -- the user will only see the page I send him back with the data from the other website. What's the easiest way to do this? Thanks in advance, Alvaro Behind a beautiful woman there's usually a guy who just couldn't wait to get rid of her.
-
I'm developing a website where the user will navigate to one of my ASP pages and from there I will navigate to a page in another website. Once I receive the resulting HTML page from that site, I will extract some of the data from it and use it to generate my own page which is what will be seen by the user. This will all happen behind the scenes on the server -- the user will only see the page I send him back with the data from the other website. What's the easiest way to do this? Thanks in advance, Alvaro Behind a beautiful woman there's usually a guy who just couldn't wait to get rid of her.
Have you tried Microsoft's Internet Transfer Control? You can provide it with a URL (from your user) and it will request the page and return the source HTML to your ASP code as a string. For example: Set Inet1 = Server.CreateObject ("InetCtls.Inet") Inet1.Protocol = 4 'HTTP Inet1.AccessType = 0 'Direct connection to internet Inet1.RequestTimeout = 60 'in seconds Inet1.URL = "http://www.codeproject.com" result = Inet1.OpenURL 'get the sourse for the url. as the end of this, the string "result" should hold the source for www.codeproject.com, which your ASP can then parse and present to the end user. Look up "Internet Transfer control" in the MSDN library for more documentation.
-
I'm developing a website where the user will navigate to one of my ASP pages and from there I will navigate to a page in another website. Once I receive the resulting HTML page from that site, I will extract some of the data from it and use it to generate my own page which is what will be seen by the user. This will all happen behind the scenes on the server -- the user will only see the page I send him back with the data from the other website. What's the easiest way to do this? Thanks in advance, Alvaro Behind a beautiful woman there's usually a guy who just couldn't wait to get rid of her.