General discussion

Locked

Retrieving content from webpages

By law ·
Is it possible, using asp, XML, java in an Applet or java/VB script running in a browser( WITHOUT installing dll's etc to the server) to load a webpage from a server (other that the one the code runs on) and have access to the data. As for example, loading weather data from a page that lists cities and temperatures and extracting relevent data for a city. I know I can do it from a VB/Java application or with a COM object but can it be done without registering anything on the server?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Retrieving content from webpages

by Jay Eckles In reply to Retrieving content from w ...

It sounds like you're talking about someone "screenscraping" a web page with totally client-side (i.e. in the browser) programming. If that's the case, then really all you have to work with is Javascript or VBScript or a Java applet. ASP can't be run on the client - it has to be run on a web server.

If you know the format of the HTML of the page you want to draw information from, it may be possible to use a Java applet to fetch the page, parse the HTML, and display the information in whatever format you want. It might even be possible to do this in Javascript by opening the page in an off-screen window and then referencing data through some DOM object like childwin.document.all['tagname'].innerHTML or something like that...making it cross-browser compatible would be a pretty good challenge.

In either of these methods, if the format of the data on the web page changes, you'll have to change your code accordingly.

The short answer to your question is, "yes, it's possible". However, I would strongly suggest you look at some server side programming; it will save you a TON of work.

Good luck.

Jay Eckles
www.jayeckles.com

Collapse -

Retrieving content from webpages

by law In reply to Retrieving content from w ...

I was able to do it in XML

Collapse -

Retrieving content from webpages

by law In reply to Retrieving content from w ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums