PHP Gmail Drive (PGD)

PhpGmailDrive is a new type of file sharing utility. Unlike typical file servers (say xDrive) it uses Gmail as backend file server. You can enjoy it simply by hosting a small PHP script in your web site without any database. Gmail file space is more than 2GB, so you can imagine you already have such a big space on internet. However, you will require a Gmail account (If you don't have any Gmail address, go GmailSwap or ask your friends.). PGD automatically connects Gmail server and fetches list of all attached files and generate downloadable links in a tree like view. If you are looking for a file server to upload your music or notes without any hassle, PGD is ideal for you. Technically speaking PGD is wrapper of Gmailer . Thought there is  no need to know hecks of PHP or Gmailer.  Just you have to check that your PHP hosting service provider has curl extension of PHP to handle HTTP/HTTPS traffic.



GMailer should works well with PHP >= 4.  Also it requires the curl extension. You may find information about curl in the PHP homepage and the curl homepage. Because GMailer ALWAYS connects to GMail via SSL, you may need OpenSSL for curl to talk SSL. Details can also be found in curl homepage.

Installation Tutorial

You may either click here or download tuotrial from sourceforge site.

Latest News


The latest version can be downloaded from source forge. Please send me comments (sorry the address is malformed to avoid spam).


Click here for screenshots of file share. File uploading often do not work. So either upload using Email attachment or use Gmail Drive shell extension if you are windows user.


Demo site 1
(let me know if you want to link your site)

The source code of PhpGmailDrive can be accessed via source forge. Installation is simple: just copy them all into a directory.

Potential Application

- Document archive: Upload documents and research work
- Doc-blog. Daily notes uploaded as Doc files are kept there.
- MP3 Files share: MP3 musics could be uploaded there.
- Picture hosting: You can share your pictures.


Impressed but Windows tool Gmail Drive. Then I wrote him to develop some tool so that I may share my attached files. Sharing email attachments are sometimes useful. You see, mail users often love to share attachments by forwarding same mails to different people which is another reason of spam. They also waste bandwidth. (Am I saving  Gmail bandwidth in other word, haha!). Fortunately PHP is popular language, so hope you add bells and whistles there.


Gmailer site quoted "...GMail is a still in beta, and GMailer  is, I would say, an "alpha hack" of a beta software. " What should I say about PGD? - Its gamma or delta release. Okay, you name it as you wish but it often works without problem. Should I quote further from Gmailer  -"
Don't expect it to work all the time, and do not build critical mission applications upon it (e.g. hmm... whatever you think is important). Just have some fun, build something interesting from it, and hopefully make your life a bit easier sometimes. ;-)"

Google is, IMHO, a good company. But she is NOT a charity. So let them make some pennies by accessing GMail through its official website, see some text ads, and click on them when you find them really useful or related (but don't click blindly: you will be misleading the "market"). That's how to make a good company stronger.

Finally, please just bear in mind that these kinds of hacking are actually violating their terms of service... so... hey, you were warned.


Please email me or visit the forum at sourceforge. For PHP related information visit

Sourceforge Logo

PhpGmailDrive is submitted as part of the sourceforge . This is released under LGPL license, i.e. you can freely use and customize them as you like. But keep my reference in improved source ( I will not sue if you remove it)

About me

Arr... thank you for being so kind to read through the entire page (I assume most of you would simply Ctrl-F & "download" & head for downloading... lol). Ok, Generally do not like to speak about me. Have a rudimentary personal web site.