HomePHP Page 3 - Setting Up a Web-based Image Hosting Service
Easy Image Hoster - PHP
Image hosting services are pretty popular in today’s overly animated and graphical World Wide Web. Almost on a day-to-day basis, we face situations where we need to host images in order to post them on a forum or share them with friends. In this article, we will discuss how to set up your own image hosting service on your web server, a la ImageShack. We will cover only freeware solutions.
Easy Image Hoster approaches image hosting from a no-nonsense perspective. It does nothing more than provide hosting functions and capabilities. The set up procedure takes less than a minute; immediately after, it handles working with images seamlessly. It is an ImageShack look-alike, including the logo.
It is a totally freeware script. However, at the time of writing, the website of the author was down. Apparently, I found out that since the site isn't reachable, you cannot download EasyImageHoster from the official source anymore. Fortunately, a quick Google search turns up quite a few results. I've found it myself.
The script per se isn't copyrighted and re-hosting isn't prohibited. With this opportunity, I thought that I'd save you precious time that you'd waste searching for this nifty little application. Therefore, I'm sharing with you the original (unmodified) archive of Easy Image Hoster v1.35. It's the latest version I could get my hands on. Unfortunately, the project died and no further releases and/or updates were done.
You can get it by clicking on the Download Source button attached below. It's archived in ZIP format. Download and extract its content to a local directory on your hard drive. It's time to modify the configuration PHP files before we upload them on the web space.
Configuration is very easy. Just edit "config.php" and set your domain, mail, and path of the uploaded files and thumbnails, then specify the maximum file size and the size of the thumbnails. You can also set the name of your "index.php." Replace the <title> bla </title> part, obviously. The same goes for "basic.php." Also, be careful because in some cases, you may be required to replace the following line (number 80) of "basic.php":
chmod("./" . $path . $imgf,0400);
Replace it with: chmod("./" . $path . $imgf,0444); This replaces the standard 0400 permissions with 0444, meaning that you will give all kinds of read permissions (owner, group, public) to the hosted images. This is necessary in most cases, but it depends.
You can host the files and folders to your web space now. Of course, CHMOD 777 is required for the following two folders: /images and /thumbs. Again, this is to make them writeable for everybody herein, including the script. Finally, check out the attached screenshot below-it's a stripped and cropped version of it.
Just because we can set it up fairly quickly and I've led you through the installation process doesn't mean you should skip the readme! So check it out.