Skrypt, który obsługuje ten formularz flashowy wygląda tak:
<? $adminaddress = "your@email.com"; $siteaddress ="http://www.yoursite.com"; $sitename = "Your Site Name"; //No need to change anything below ... // Gets the date and time from your server // Gets the IP Address if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); // Gets the POST Headers - the Flash variables $action = $HTTP_POST_VARS['action'] ; $email = $HTTP_POST_VARS['email'] ; $name = $HTTP_POST_VARS['name'] ; $comments = $HTTP_POST_VARS['comments'] ; //Process the form data! // and send the information collected in the Flash form to Your nominated email ad
dress if ($action == "send") { // "A visitor at $sitename has left the following information\n Name: $name Email: $email\n The visitor commented: ------------------------------ $comments Logged Info : ------------------------------ Using: $HTTP_USER_AGENT Hostname: $ip IP address: $REMOTE_ADDR Date/Time: $date","FROM:$adminaddress" ) ; //This sends a confirmation to your visitor "Hi $name,\n Thank you for your interest in $sitename!\n Cheers, $sitename $siteaddress","FROM:$adminaddress") ; //Confirmation is sent back to the Flash form that the process is complete $sendresult = "Thank you. You will receive a confirmation email shortly."; $send_answer = "answer="; } // ?>
Poniżej link do wszystkich plików skryptu (pliki źródłowe *.fla i *.php):
http://www.bysiu3.wcentrum.com/Flash_MX-Mentaler-8880.zip