tags:

views:

57

answers:

1

My Flex code is unable to reach the PHP, but when i do normally it works like

http://localhost/search/populate.php?urlWeb=http://www.google.com

$url = addslashes( $_GET['urlWeb'] );

if( !$url )
{
   die( "You need to define a URL to process." );
}
else if( substr($url,0,7) != "http://" )
{
   $url = "http://$url";
   $output = "<loginsuccess>";
   $output .="yes";
   $output .= "</loginsuccess>";
   print($output);
}
<mx:HTTPService id="addWeb" resultFormat="object" result="Added(event)" showBusyCursor="true" method="GET" url="http://localhost/search/populate.php" useProxy="false">
     <mx:request xmlns="">
      <urlWeb>
       {urlWeb.text}
      </urlWeb>
     </mx:request>
    </mx:HTTPService>
A: 

Hi, it may be a crossdomain.xml issue. Try placing a crossdomain.xml file (http://localhost/crossdomain.xml) with the following contents:

<?xml version="1.0"?>

<cross-domain-policy>

 <allow-access-from domain="*" to-ports="*" secure="false" />

</cross-domain-policy>

And run the app again. If it still doesn't work can you please add fault handler to your HTTPService, check if you have an error and if you do post it here so we can see what's the problem?

radekg