I'm trying to create my own POST multipart session from PHP which is all working except for transferring certain files. Eg. PHP is connecting to a website and acting like it is a form that has just been submitted with a file. The filesize doesn't seem to matter but more the mime type.
content-disposition: form-data; name="file"; filename="filename.tar.bz2"
That is what I am using so far and php manages to see the file but comes back and says it never finished uploading. Yet if I use the same filename and just change it to simple text file it all goes through smoothly. tar.gz doesn't work, neither does .tar. I'm thinking it's the encoding I'm using or the way I am reading the file in (using file_get_contents). Is there a better way to do this? Thanks for any suggestions in advance.