I’m building a script to grab text and content from a html. The content gets rebuilt into an XML to give to Flash.
I’ve got a basic version running using this [url=http://planet.keks.com/about/index.php]xml2html parser
[url]http://www.robotacid.com/assets/toxml.php
eg:
[url]http://www.robotacid.com/assets/toxml.php?url=http://www.robotacid.com/splash.html
But I would rather be building an XML that Flash can read without getting Flash to do all the hard work (ie: CDATA tags, image files as separate nodes, etc.), but I don’t know how to open a remote file for reading. The following code doesn’t work:
[code]
$url = $_GET[‘url’];
$fp = fopen($url, ‘r’) or die(“failed to open html”);
$fileString = fread($fp, filesize($url));
fclose($fp);
I get a no such file or directory.
The XML parser seems to able to read from any address, but I can’t isolate the commands responsible. Can anyone help me please?