1567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
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 been a member for 4-5 years
  • Beta Tester
  • Sold between 5 000 and 10 000 dollars
  • Author had a Free File of the Month
  • Europe
  • Bought between 1 and 9 items
  • Exclusive Author
  • Referred between 1 and 9 users
marpies says

Mmm, seems fine.. any errors??

Try adding this if it makes a difference..
loader.dataFormat = "text";
1567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
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