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.'; ?> Link to comment https://forums.phpfreaks.com/topic/99021-having-php-tell-my-alivepdf-to-save-to-my-webspace/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.