ActionScript 3.0 :: Send An "action" From Flash Using POST?
Sep 29, 2010
I have a form in html that I need to send out from flash (in the backend).
How would I do this? The form is a POST form and has an "action" value that I need to send. I know how to pass variables with URLLoaderDataFormat and PHP but I don't understand how to pass that "action" value out from flash.
Basically I need to know if there a way to replicate sending a html form in flash with an action value.
Im building a reservation form, using actionscript and php. I use sendAndLoad to send variables to php via POST, which returns a different HTTP POST response in case of sucess or not.
Is there anyway to "read" HTTP POST responses with actionscript?
Example of code which would be used to send a bunch of variables to a PHP script via flashThis would require the PHP script to load when the data is sent.I want to use this for a Flash event calender which triggers more information about the event to appear in a HTML area of the page when an event is clicked on. The PHP file would be the same file that the SWF is embeded in so the FLASH file would reload the page with the variable sent to the PHP. The PHP would use this variable to select the right content from a MySQL database.
I have developed a facebook application in which I am sending data from Flash to Php.Its actually a game based on Flash 8 and at the end I send data by using
loadVarsNum()
using POST method to flash but the problem is this data can be easily tampered so I want know that how can I secure my data from theft or any hack
i created xml in flex after that creation i post to php via http service but when i add like xml in http service flex throws error msg like Error #1096: XML parser failure: Unterminated element." What did i worng ? How to send xml data flex to php ?
<mx:HTTPService id="createxml" method="POST" url="http://####/admin/?do=storebettingdetails" useProxy="false"></mx:HTTPService>var xm:XML = new XML("**********"); ------ adding child node -- Thend attached xml to service like createxml.request=xm; createxml.send();
is it possible for flash widge on site a.com to send POST request to b.com ?If so, couldn't this be quite dangerous ? A user would be performing POST to an unknown host
I'm trying to create an asp.net mvc controller method that will return an image generated by a POSTed bytearray. The post is coming from Flash and has the request header: "Content-type", "application/octet-stream" (although this can be changed if needed).[URL]
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream"); var jpgURLRequest:URLRequest = new URLRequest("jpg_encoder_download.php?name=sketch.jpg");
have a form in html that I need to send out from flash (in the backend).How would I do this? The form is a POST form and has an "action" value that I need to send. I know how to pass variables with URLLoaderDataFormat and PHP but I don't understand how to pass that "action" value out from flash.Basically I need to know if theres a way to replicate sending a html form in flash with an action value
A flex app running in a view of my .NET MVC app can load data fine from another route, but submitting data via either POST or GET never invokes the controller action. Interestingly, the only way I can get the action method to fire is by passing intentionally malformed post variables in the http request. Odd. Content type is application/x-www-form-urlencoded and I have set authentication to "None" in web.config with no improvement.
I am trying to get my flash application to send a request back to the webserver so that it can get some information. So far after reading on stackoverflow for a while and on the net I have some code written, but its not quite working right. I need just a little help tying it all together.
I am trying to send some variables from my actionscript 3.0 to PHP file.. but if i am using POST method I am getting an error instead if I use GET method it is working fine but then there comes the security issue. All my variables are displayed in URL which I dont want to happen. This is my code:
What I need to do is have a button download a installer using Post with added values to download.What I have to mix is this:Peices needed frokm HTML form:
I want to create a movie clip where the user can adjust it selecting various colors shapes characters etc etc...and add someones email address to sent! From that movie clip...a snapshot is taken and sent over to php (in binary code or not) and from there php will send it to that someone the user chose before in Flash... Is it just me or am i thinking the wrong way!?
I am having a little trouble sending an xml string to an HTTPService an Actionscript3 (see code below). Basically, I am trying to send a georss xml string for conversion into another format. I am getting an ioError and suspect the xml is causing havoc with the services parser. I know this approach is probably not the best, but this is where I am at.
I have a problem with sending email from a flash contact form using ASP. I'm trying to send data to ASP with the POST method, and then send an e-mail using ASP code, but it doesn't work. In fact, when pressing the submit button in a Flash contact form, in IExplorer nothing happens, and in Mozilla I get a message Waiting for[code]...
I'm trying to reproduce a POST request that was captured from WireShark using PHP. This POST request was sent by a Flash (.swf) object, so it's a little bit complicated in configuring the header.It does not print out anything in the end, so there must be something wrong with PHP code that I could not see.Here is what WireShark captured:
POST /engine/ HTTP/1.1
Host: abcdef.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0
I'm making a contact page in as3 and I need some help. How do I send post data to a php page on this web page http://parallels.fm. Basically I have three dynamic text fields and a submit button. If I can send post data from that page to a php page that would be great.
When trying to send a POST request to an ASP.NET asmx web service I am seeing (in Charles and Firebug) it go through as a GET. Here is my AS3
[Code]...
This seems to be an issue with flash as it is happening before it even goes to the server. I have uploaded this to a testing server and I still see it come through as a GET.
I would like to use Flash to send a ByteArray (of a PNG image) to a php file, in a facebook application. Is there a way to do this by sending the ByteArray as just one POST variable instead of as the entirety of the POST data?
There was a nearly identical question here: How can I send a ByteArray (from Flash) and some form data to php? but the problem is different; instead of smuggling other variables in other parts of the request, the image itself has to be sent as just a variable because Facebook commandeers the post data and puts in its own junk.
If not, can I send the image in some form other than a byteArray?
Let's say I'd like to post some data to a server side script. If my data is
var data:String = "<data><tag1>hi</tag1></data>";
and I'd like to send it with LoadVars, I can do:
var lv:LoadVars = new LoadVars() lv.data = data; lv.sendAndLoad("http://thescript/", lv, "POST");
However, this results in the POST looking like this:
data=<data><tag1>hi</tag1></data>
if I want to send it without the variable name (no "data=", just the actual data), how is this possible? In AS3 I can just use the .data property of a URLRequest and it will work, however I can't find a way to do this in AS2.
I've used the Flex HTTPService to connect to a backend blazeDS service without any problems at all. The question I have is, can I also use HTTPService to send a HTTP POST message to a server (with basic authentication)?
Specifically I'd like to be able to interface Flex with Notifo [URL] and to interface with it you just need to send a http POST with authentication and some key:value strings for the message content. (I've done it from java and from the command line with curl and it all seemed pretty easy to set but I'm just not sure how to go about trying this with Flex).
How would this be done via the HTTPService (if at all) ?
Can anyone see how the mxml/as class would look like and what would be in the services-config file and what adapters need to be used etc etc ??
i am using flash cs5 with AS3 along with PHP 5, i am calling a https page and sending post data to it and retreiving the response, its working fine inside action script (FLASH CS5 IDE) but when i am embedded flash in html to use it from my web server (WAMP) then it is unable to send and receive data from https url.
i have turned on the mod_ssl module from php.ini for both php and apache.
but still there is no gain. can you advice me any method to control this thing with in action script 3, (i tried php curl but not useful) or the right way to do it, i want to post and receive data from https url from action script or php.