I am trying to send a URL from as3 to php.
but, I think, it is not reaching properly to php. anyone knows why?
my code :-
var url:String = String(tubetxt.text); // the URL is in text field
var request:URLRequest = new URLRequest(“my.php”);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
var urlVar:URLVariables = new URLVariables();
urlVar.myvar = url;
request.data = urlVar;
request.method = URLRequestMethod.POST;
php code //
$myURL = $_POST[“myvar”];
how to send a URL from as3 to php? please help me.
thanks in advance.
Mmm, seems fine.. any errors??Try adding this if it makes a difference..
loader.dataFormat = "text";
sorry Marpies, it is not working at all.
Strange thing is that, url is passing properly on my server but not on my client server.
on my server, the php.ini file is in etc directory.
on my client’s server , the php.ini file is in usr/lib. is it the problem or anything else.
kindly help me.