views:

131

answers:

2
getURL('http://www.google.com',_blank);

The above can open google.com,but how to fetch data from server side(PHP) on localhost?

A: 

I'm assuming this is in a Flash file you run in the user's browser? Then all URLs are relative to the user's browser as well, so you need to put in your site's "public" URL.

Pekka
+1  A: 

I found this tutorial

<?
$first="this";
$second = "that";

echo "myfirst=$first&mysecond=$second";
exit;
?>

Flash Actionscript:

var lvSend = new LoadVars();
var lvReceive = new LoadVars();
lvSend.SendAndLoad("www.domain.com/script.php",lvReceive,"POST");

lvReceive.onLoad = function(bSuccess) {
if(bSuccess == true) {
trace(this.myfirst);
trace(this.mysecond);
}
}