siddscool19 Posted January 5, 2009 Share Posted January 5, 2009 I want to use curl such that I can make the file to appear as "Are you sure you want to download?" instead of loading the page.... Like when I open my php page and it has curl to load http://www.phpfreaks.com it should give me a html file instead of sending the site in text form......... Thanks:) Quote Link to comment https://forums.phpfreaks.com/topic/139553-make-file-to-download-instead-loading/ Share on other sites More sharing options...
Adam Posted January 5, 2009 Share Posted January 5, 2009 You need to modify the headers in the file to force the download, perhaps this could be of help to you: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html A Quote Link to comment https://forums.phpfreaks.com/topic/139553-make-file-to-download-instead-loading/#findComment-730014 Share on other sites More sharing options...
siddscool19 Posted January 6, 2009 Author Share Posted January 6, 2009 But how to implement it with curl? Quote Link to comment https://forums.phpfreaks.com/topic/139553-make-file-to-download-instead-loading/#findComment-730644 Share on other sites More sharing options...
Adam Posted January 6, 2009 Share Posted January 6, 2009 In the 'header' of your script? Modify the headers so the browser knows to force the download of the file rather than just display the contents fetched from cURL. Can't tell you specifically to your script seen as you've not shown any code... Mr.A Quote Link to comment https://forums.phpfreaks.com/topic/139553-make-file-to-download-instead-loading/#findComment-730706 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.