Skip to content
Advertisement

How to solve cUrl corrupting file during download

I really, really need help as to how to solve this issue I’m having:

Using script:

JavaScript

I have asked before, and no-one seems to have a solution as to how I solve this… If someone can even tell me why it’s happening ie. is it file size, binary transfer etc. I can work with that!

The file ZIP file downloads and creates somefile.zip but the XML file within is partially corrupt.

Sample:

JavaScript

Advertisement

Answer

Can you set CURLOPT_HEADER to 0 and try again?

Edit:

Or try this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement