HomePHP Page 2 - Setting Up a Web-based Image Hosting Service
GM Photo Host - 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.
This is a simple yet feature-laden photo hosting service. It doesn't require MySQL, thus, user registration isn't supported. It sports a user gallery. This is the place where the thumbnails of the hosted images are listed.
You can download it from here; click on the "download" button. As you can see from the above screenshot, its UI is quite minimal, although I cropped the rest of the page. It comes with a pre-written Terms of Service [TOS] and also has reserved space for advertisements (AdSense and others) and banners of partner sites. The tools page allows other people to set up your image hosting service on their site.
Now let's talk for a few seconds on how to set it up. Download the archive and extract its content to a folder on your hard drive for now. Here comes the part that you might dislike, but we cannot stress it enough: thou shalt always read the documentation and/or manual that accompanies any product-let it be software, hardware, or consumer electronics. In this case, it's called "README.txt". Please don't ignore it.
You are required to do a few edits on various PHP configuration files. It's advisable to replace the title of the page in the "header.php" file (<TITLE>Best Site Ever etc</TITLE>) and also change the information on lines 38 and 39 regarding the recommendation mail (its content) that any user may send through your site (Tell a Friend). In "contact.php," you should replace the link of your form-to-mail page (this is for feedback) on line 34.
Moving on, you can configure the attributes of your gallery in "gallery_php.php." Also, on line 32 of "galleryImage.tpt" you need to add the link to your website. This is important! The same goes for the following three index pages: "index.php", "index2.php", "index3.php", but also the "tools.php." Replace all occurrences of "yoururl.com" with your exact URL (e.g. best-site-ever.com).
Ultimately, you should replace the name of your site in "iframe.php" on line 18. You need to search for the text that appears related to "powered by bla bla." That's where you ought to add what your site is called. That's all. You are ready to host the whole bunch of files and folders on your web space.
Finally, let's apply the necessary permissions. Modify CMOD /images/ and /images/thumbs to 0777 (or just 777), which is basically drwxrwxrwx. This is the way it's stated in readme, but you don't really need execution for the storage directory of the hosted images.
By now your GM Photo Host should be up and running. Just target your browser to "index.php" of the folder where you host everything. Also, you can create a fancy button that brings up that page; it's all up to you.