exitof99 Posted August 19, 2009 Share Posted August 19, 2009 Okay, I'm stumped. I've been searching for hours on how to retrieve a csv file using cURL when the HTTP headers say 'force-download'. The process: 1. Log in to website. 2. 'Click' link to download dynamically generated csv file. Step 1 works perfectly, a cookie file is being used to store the session variable. Step 2 returns *only*: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Cache-Control: max_age=0 Content-disposition: attachment; filename="filename.csv" Pragma: public Content-Type: application/force-download Transfer-Encoding: chunked Date: Wed, 19 Aug 2009 22:54:58 GMT If a user manually goes through this process, they receive the 'Save or Open' dialog which awaits their response before continuing. How do I get cURL to accept the download? Link to comment https://forums.phpfreaks.com/topic/171059-curl-vs-content-type-applicationforce-download/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.