Archive for April 7th, 2007

How to upload a file with HTTP POST?

How to upload a file, e.g. music, image file to a webserver? To do this, there are several ways available: FTP, SFTP, and so on, usually FTP is the common one, almost all file servers support FTP, but the user must have a valid account in server, this will cause a lot of security issues, also it is not friendly for average users. The most easy and popular way is uploading in web pages, this is straight-forward, even a monkey can do it, just press the ‘submit’ button. But that enforces you to get your files uploaded in web pages, you’ll feel tired if you have to upload dozens of files. So If we got a client which uploads files automatically for us, it will be a convenient tool.

This is an article that teaches you to make your tool for uploading files with http protocal step by step. I’ll write this program in C++.

The idea behind ths program is simple,  it simulates a browser, and submmit files to sever using HTTP post.

To be continued…

Read the rest of this entry »