I have a new best friend in town and his name is Proxy.
Basically this is a quick and easy work around for flash’s STUPID security issues.
You simply send your link (to a file on a different server) to the proxy(on your server) and flash thinks that those files are actually local files!
<?php
$url = 'http://';
if (isset($_GET['url']) && $_GET['url'] != '')
{
$url .= $_GET['url'];
}
$mimeType = 'application/xml';
$response = file_get_contents($url);
if ($mimeType != "")
{
header("Content-Type: ".$mimeType);
}
echo $response;
?>
and in ActionScript 2 you would call it like:
_xml.load( PROXY_URL + "?url=" + RSS_URL );

One Trackback/Pingback
[...] something I did for TurboTax. It’s an AS2 RSS reader. It’s also my first use of a PHP Proxy… and I think I’m in love. I wanna build PHP Proxy for everything now, even my [...]
Post a Comment