File upload/download on MySQL database

Well… It is already a well discussed topic. But when I was first trying to find out how to do this, I really got stuck. Actully it took me a lot of time to find out the key code segment for the purpose.

So, here is what I’ve learned:

The table:

Suppose the structure of the MySQL table (say ‘file_table‘) is like this:

It has three fileds:

  • id : the primary key, integer type with auto increment feature.
  • content: the content of file, blob type.
  • type: varchar type, the type of the file (e.g. doc, pdf etc.).


I think you can create a HTML form with a input with file type. Its pretty simple. Just use this code to make a input field be able to upload file:

<input id="file_upload" name="file_upload" type="file" />

Now the backend coding. I’m using PHP for this. Continue reading

Download From Rapidshare and other file hosts

Rapidshare is one of the most popular file hosting server. There are some others like Megashare, Megaupload etc. And it is a bit troublesome for us who don’t have a premium account with them. After searching a bit on the web, I’ve discovered this useful software. Well, it doesn’t crack those sites or something but lessens the hassle a lot for me.
It generates the direct link itself and does all the waiting. I don’t need to wait for one download to complete and then start another after few minutes waiting. Just paste all the links at once and it does the rest. Cool huh?!

Well, for those sites who uses capcha or something like that, you have to write down the code yourself. Though its far more hassle free.

I don’t know much about the author. The original link on the software is: and the translated version is here.

Download the file from here: Rapidshare File Downloader