1568 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
rahulbist says

hi, everyone,

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;

loader.addEventListener(Event.COMPLETE, handleComplete);

loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);

loader.load(request);

php code //

$myURL = $_POST[“myvar”];

how to send a URL from as3 to php? please help me.

thanks in advance.

182 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+5 more
marpies says

Mmm, seems fine.. any errors??

Try adding this if it makes a difference..
loader.dataFormat = "text";
1568 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
rahulbist says

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. :(

by
by
by
by
by
by