通过PHP从Flash应用程序发送邮件 [英] Sending mail through PHP from a Flash application
本文介绍了通过PHP从Flash应用程序发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我建立一个Flash网站,我想请发送到我的Gmail地址信息。
在Lynda.com教程中,我用说我需要进入PHP的地址。那是什么,如何做呢?
这是我的code编辑
如果(thename.text ==|| theemail.text ==|| thephone.text ==|| themessage.text ==){
thefeedback.text =*请填写所有字段;
} 其他 {
VAR allvars:使用URLVariables =新的URLVariables()
allvars.name = thename.text;
allvars.email = theemail.text;
allvars.phone = thephone.text;
allvars.message = themessage.text;
//发送信息到一个新的请求
VAR mailAddress:的URLRequest =新的URLRequest(HTTP://无论去here.php);
mailAddress.data = allvars;
mailAddress.method = URLRequestMethod.POST;
的sendToURL(mailAddress);
thefeedback.text =谢谢;
thename.text =;
theemail.text =;
thephone.text =;
themessage.text =;
}
解决方案
您可以使用Zend的PHP使用PHP函数从Flash。
本教程是pretty的好:的 http://www.flepstudio.org/forum/tutorials/3421-actionscript-3-0-zend-amf.html
I am building a flash website and I want contact information sent to my gmail address.
The Lynda.com tutorial I am using says I need to "enter the php address." What is that and how do I do it?
This is my code edited
if (thename.text == "" || theemail.text == "" || thephone.text == "" || themessage.text =="") {
thefeedback.text = "*Please fill out all fields";
} else {
var allvars:URLVariables = new URLVariables()
allvars.name = thename.text;
allvars.email = theemail.text;
allvars.phone = thephone.text;
allvars.message = themessage.text;
// Send info to a new request
var mailAddress:URLRequest = new URLRequest("http://whatever goes here.php");
mailAddress.data = allvars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
thefeedback.text = "Thank You";
thename.text = "";
theemail.text = "";
thephone.text = "";
themessage.text = "";
}
解决方案
You can use Zend PHP to use PHP functions from Flash.
This tutorial is pretty good: http://www.flepstudio.org/forum/tutorials/3421-actionscript-3-0-zend-amf.html
这篇关于通过PHP从Flash应用程序发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文