Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.
<?php
/*
Note that this line: /F (http://www.mysite.com/CompletionForm.pdf)
determines the PDF File to be filled in.
*/
$txtName = $_GET['txtName'];
$txtCourseName = $_GET['txtCourseName'];
$txtCompletionDate = $_GET['txtCompletionDate'];
//FOR TEST
//echo $txtName;
//echo $txtCourseName;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Cache-Control: private",false);
header("Content-Description: File Transfer");
header("Content-type: application/vnd.fdf");
echo <<<EOT
%FDF-1.2
1 0 obj
<<
/FDF
<<
/Fields
[
<<
/T (txtName)
/V ({$txtName})
>>
<<
/T (txtCourseName)
/V ({$txtCourseName})
>>
<<
/T (txtCompletionDate)
/V ({$txtCompletionDate})
>>
]
/F (http://appdevelsvr:8080/shquiz/media/certificate/SH_CertificateofCompletion.pdf)
>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
EOT;
?>
Do more with
Premium Content
You need an Expert Office subscription to comment.Start Free Trial