[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.
error_reporting( E_ALL|E_STRICT );
$r = $_REQUEST;
$string = '';
//echo '<pre>'; print_r($_GET); echo '</p>';
$name = ''; //basename( $_GET['form'] );
$postdata = file_get_contents( 'php://input' );
$name = 'Application_' . date( 'Ymd_his' ) . '_' . rand( 1000, 9999 ) . '.pdf';
$file = "/var/www/tmp/$name";
$f = fopen( $file, 'w' );
fwrite( $f, $postdata );
fclose( $f );
$finfo = new finfo( FILEINFO_MIME ); // return mime type ala mimetype extension
$info = $finfo->file( $file );
if ( $info !== 'application/pdf; charset=binary' )
unlink( $file );
die( "Error: the file type you have submitted ($info) is not valid." );
$pdf = wordwrap( base64_encode( $postdata ), 72, "\n", true );
$recipient = 'academy@****.ie';
$cc = '****@gmail.com';
$bcc = 'info@****.ie';
$sender = 'no-reply@****.com';
$subject = 'Application Form';
$boundary = '==Multipart_Mix_x' . md5( rand( 1000, 9999 ) ) . 'x';
$headers = "From: $sender\n";
$headers .= "Cc: $cc\n";
$headers .= "Bcc: $bcc\n";
$headers .= "X-Mailer: PHP v5.3\n";
$headers .= 'MIME-Version: 1.0'."\n";
$headers .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'."\n\n";
$message = <<<__MESSAGE__
This is a multi-part message in MIME format.
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Application form attached. For support, please contact ****@****.
mail( $recipient, $subject, $message, $headers );
//echo "<h1>Thank You!</h1><hr>Your form has been received.<hr>";
//header("HTTP/1.1 200 OK");
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.example.com/thankyou/" );
header( "Connection: close" );
Open in new window
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.