TRemmie Posted April 1, 2008 Share Posted April 1, 2008 I am a huge PHP newbie, so I had to come ask some questions. I am currently using AlivePDF to generate PDFs that a user can come customize with their info, pic, etc... The final steps in the Actionscript code calls a basic PHP script that I believe leads to Save as dialog box. Is it possible to have it... Save to my website instead of letting the user save it themselves? Here is the code it uses. <?php $method = $_GET['method']; $name = $_GET['name']; if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) { // get bytearray $pdf = $GLOBALS["HTTP_RAW_POST_DATA"]; // add headers for download dialog-box header('Content-Type: application/pdf'); header('Content-Length: '.strlen($pdf)); header('Content-disposition:'.$method.'; filename="'.$name.'"'); echo $pdf; } else echo 'An error occured.'; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.