Ciao, sto cercando di realizzare delle e-card da inviare da un sito in flash.
Ho trovato un tutorial che mixando flash e php spiega come creare il tutto.
Le pagine php sono 2, SelectCard.php e SendCard.php, il .fla è uno e poi ci sono le singole card che vengono "pescate" esternamente. All'invio della Card, viene generato un file txt con i riferimenti della Card scelta (1, 2, 3, ecc) ed il testo inserito, titolo, messaggio ecc.
Ho pubblicato il tutto (su aruba) nella cartella public, l'unica con permessi di scrittura... Il file txt viene generato senza problemi, ma non invia la mail!![]()
La cartolina poi la crea, utilizzando il file txt generato riesco a vederla on-line, ma mail niente da fare, non la invia![]()
Non so più se è un problema di Provider, di php, di AS...![]()
Vi posto l'action attribuita al pulsante di invio nella pag flash:
on (release) {
if (ToName eq "") {
_root.Status = "Please enter the Name of the person your sending this to";
} else if (FromName eq "") {
_root.Status = "Please enter your Name";
} else if (ToEmail eq "") {
_root.Status = "Please enter the Email address your sending this to";
} else if (FromEmail eq "") {
_root.Status = "Please enter your email address";
} else if (Greeting eq "") {
_root.Status = "Please enter a greeting message";
} else if (IntroMessage eq "") {
_root.Status = "Please enter a Intro Message";
} else {
gotoAndStop (3);
_root.Status = "Sending Ecard - Please Hold";
loadVariablesNum ("SendEcard.php", 0, "POST");
}
}
e la pagina php:
<?
$CreateEcard = date(U);
$filename = $CreateEcard.".txt";
$ToName = stripslashes($ToName);
$FromName = stripslashes($FromName);
$Greeting = stripslashes($Greeting);
$IntroMessage = stripslashes($IntroMessage);
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
$Created="Ecard Created on $Today";
$EcardNum = $EcardSelect;
$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromNam e&FromEmail=$FromEmail&
Greeting=$Greeting&IntroMessage=$IntroMessage&Crea ted=$Created";
$fp = fopen( "./$filename","w");
fwrite($fp, $EcardText, 10000);
fclose( $fp );
######Email Card########
$ToSubject = "You have recieved a Flash Ecard from $FromName";
$Message = "$ToName,\nYou have received a Flash card from $FromName. \nClick the following link to view
your card:\n\n http://www.miosito.com/public/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum
\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage
\n\n-$FromName\n\n\n-----------------------------------\nThis card was sent from www.miosito.com/\n\n";
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName."
<".$FromEmail.">");
print "_root.Status=Success your Card Has Been Sent!";
?>
Scusate il messaggio lungo
grazie a chiunque mi salva dalla pazzia...![]()