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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by