Alert I've seen some people have asked but its usually about CURL, I am asking about sending it via WinSock2.
Alright so I know how to make POST and GET statements pretty easily, (POST with Application/application/x-www-form-urlencoded) but I am not sure how to use multipart/form-data, I know it has something to do with boundary to specify when you are done sending data.
But what should a basic HTTP POST look like for uploading files? (Also can you upload to a PHP POSTBACK? If It was application/x-www-form-urlencoded I could see it something like filename=hello.png&data=...)
Something like this format: (This is all I know about sending the data) I can't find a solid example online so I am asking the question.
POST /postback.php HTTP/1.1
HOST: www.website.com
Content-Type: multipart/form-data; boundary=----IAmABoundary
Content-Length: 300
------IAmABoundary
Send Binary Data?
------IAmABoundary--