abracadabraPDF › Forums › PDF – Général › Bouton envoi d’un email avec adresse mail par défaut (Adobe Reader) › Répondre à : Bouton envoi d’un email avec adresse mail par défaut (Adobe Reader)
10 juin 2015 à 12:27
#59052

Maître des clés
Exemple de script PHP ci-joint.
Code:
header(« Content-type: application/vnd.fdf »);
// read in the XFDF data sent by the form
$fdf = file_get_contents(« php://input »);
// generate a customer ID number
$registration = time();
// process the FDF data
$log = fopen(« $registration ». »_data.xfdf », »w »);
fwrite($log, $fdf, strlen($fdf));
fclose($log);
// reply with some FDF data
echo << %FDF-1.2
1 0 obj
<< /FDF <<
/Status (Le formulaire a bien été transmis, il y sera répondu dès que possible. Merci de votre confiance.)
/Fields[ << /T(idnumber) /V($registration) >> ]
>>
>>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
RESPONSE;
//
$message=’Un nouveau formulaire est arrivé’;
$subject=’Nouveau formulaire’;
$address=’destinaire@mondomaine.demo’;
mail($address, $subject, $message);
?>
// read in the XFDF data sent by the form
$fdf = file_get_contents(« php://input »);
// generate a customer ID number
$registration = time();
// process the FDF data
$log = fopen(« $registration ». »_data.xfdf », »w »);
fwrite($log, $fdf, strlen($fdf));
fclose($log);
// reply with some FDF data
echo <<
1 0 obj
<< /FDF <<
/Status (Le formulaire a bien été transmis, il y sera répondu dès que possible. Merci de votre confiance.)
/Fields[ << /T(idnumber) /V($registration) >> ]
>>
>>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
RESPONSE;
//
$message=’Un nouveau formulaire est arrivé’;
$subject=’Nouveau formulaire’;
$address=’destinaire@mondomaine.demo’;
mail($address, $subject, $message);
?>
:Smiley15: