PHPBuilder - PHP and Flash



RSS Twitter
Snippets Other

PHP and Flash

by: Yevgeniy
|
October 15, 2000

Version: 1.0

Type: Sample Code (HOWTO)

Category: Other

License: GNU General Public License

Description: Sample send-recieve data from Flash to PHP script and return to Flash



<?php
//This script receive from Flash than  send data to Flash movie
//
//You need additional *swf file, where whill be vaiables txt_input and
// txt_from_flash as text fields. Create button in flash movie that send
// variables to script using  Load Variables ("getvar.php", "", vars=GET)
//or vars=POST

if ($QUERY_STRING!=""){
parse_str(urldecode($QUERY_STRING));
print "txt_input=This data recieve GET\n$txt_from_flash";}
elseif($REQUEST_METHOD=="POST"){
parse_str($HTTP_POST_VARS);
print "txt_input=This data recieve POST\n$txt_from_flash";
}
else{
if ($REQUEST_METHOD=="POST"){
print "txt_input=POST";}else{print "txt_input=GET";}

?> 

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Yevgeniy

Comment:



Comment:

(Maximum characters: 1200). You have characters left.