joecooper Posted February 7, 2009 Share Posted February 7, 2009 Hi, i am using this script for a php page to download an exe file, it works fine. header('Content-type: application/exe'); header('Content-Disposition: attachment; filename="SETUP_file.exe"'); @readfile( "SETUP_file.exe" ); ?> as i am paying for advertising, i have this JS code that is used for conversion tracking, do i just add this after the php page? should it load properly? <!-- Adengage conversion script --> <script language="JavaScript" type="text/javascript"> <!-- ae_cust_id = 9723; ae_amount = 0.00; ae_landing_page = false; ae_page_view = true; ae_registration = false; ae_lead = false; ae_sale = false; //--> </script> <script language="JavaScript" src="https://conv.adengage.com/conversion.js"> </script> <!-- End Adengage conversion script --> PS, if anyone knows how to send the file size of the exe file? as it says its not known when downloading the file Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 7, 2009 Share Posted February 7, 2009 you cant add the javascript code onto that but if you sent your user to one page with that on it then javascript redirected them to the download page (basically what most download sites do). that way you can display a page with your adds and a download/save window. also for the file size check out the comments on the php manual header Scott. Quote Link to comment Share on other sites More sharing options...
BloodyMind Posted February 7, 2009 Share Posted February 7, 2009 maybe u should add this: header("Content-length: {$file_size}"); 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.