1573 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Author Level 2
  • Collector Level 2
+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
  • Affiliate Level 1
  • Author Level 4
  • Collector Level 1
  • 6 Years of Membership
+4 more
marpies
says

Mmm, seems fine.. any errors??

Try adding this if it makes a difference..
loader.dataFormat = "text";
1573 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Author Level 2
  • Collector Level 2
+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