Is it possible using AS2.0 to grab the HTML source code of a webpage and store it as a string? I’ve always wanted to do something like this and a few years ago it was only semi-possible. Is anyone aware of new developments in Flash/Actionscript that would allow this?
The closest I’ve come in my attempts to do this is with this code (thanks to McGiver, about 3 years ago):
webcode = new LoadVars();
webcode.load("http://www.google.com");
webcode.onLoad = function() {
trace(unescape(this));
};
However, while the above code does manage to output some of the source code of the given URL, it is somewhat jarbled.
For my original post years ago, see http://www.kirupa.com/forum/showthread.php?t=63793