• September 19, 2019, 02:28:54 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: DIY: How to easily view your FTP'd images in a gallery using your web browser  (Read 61255 times)

TD99

  • Level 2 Member
  • **
  • Posts: 74

If you're like me, you've probably installed your cameras by now and have them sending up images to an FTP server either on a schedule or when motion is detected (I use the latter). But the problem is: "How do I easily view the images using my web browser?"

Sure, you could view them one at a time by going to "http://www.mysite.com/folderwithimages", but I wanted a FAST and FREE way to view a gallery of thumbnails of the captured images.

Well, I did some research and found a pretty good solution which I will walk you through below (yeah, I'm an engineer and tech writer by trade, so I like documenting cool finds and then sharing them with others).

The following does require a little technical know-how in terms of web servers, etc. but I'll try to be as descriptive as possible.

And now, the solution: phpAlbum.net

It is an Open Source PHP script which allows you to create your personal Photo Album / Gallery in just a few seconds. All you need is a web space with FTP access. No database is needed. After a few clicks with the phpAlbum.net Installer you are ready to upload your photos, create new directories /galleries, and use your photo album.

Since the site has an installer, I was up and running in minutes.

Read all about it and run the installer here:
http://www.phpalbum.net/

Tip: Before you get started, you should confirm that your web hosting provider supports PHP 5 (chances are that they all do, but you never know.)

The basic steps are:

1. Pick a folder on your web server which will house the phpAlbum files.
2. Installed phpAlbum to that folder.
3. Configure your cameras to upload the images to the "photo" folder that phpAlbum creates.
4. Enjoy the online gallery!

For my example, we will be using the website "www.mysite.com" which you will replace with your own domain name.

The first thing I did was log into the control panel of my web server's hosting provider and created a new subdomain name called "security". That way, I could go to "http://security.mysite.com" to view the captured images. Once I did this, a new folder called "security" was automatically created on my web server.

Next, I created a temporary FTP user account solely for the purpose of installing phpAlbum (tip: avoid using your site's administrator account whenever possible). I gave the new account a default access folder location of "/www/security". That way, when I connect to the FTP server using that new account, the default "root" folder will be the "security" folder.

Once that was done, I went to the phpAlbum installer page where I entered the name of my FTP server (ftp.mysite.com), the temporary user name I had created and the password. I also made sure that I set the default folder to just "/" which as stated above, is really the "security" folder. If I had left that install path as the default then it would have created a subfolder called phpAlbum which is not good because that means I would have to go to "http://security.mysite.com/phpAlbum" in order to view the gallery.

When the install was done, I deleted the temporary FTP user account created earlier.

Using FileZilla, I connected to my FTP server (ftp.mysite.com) so I could see and work with the folders that phpAlbum had created. The folder you are mostly concerned with is the one called "photos_XXXXXXXX" where "XXXXXXXX" is a unique random number created for your particular install. This is to keep hackers and nosy people for guessing where your images are directly stored.

Since I have four cameras, in FileZilla I manually I created four new subfolders within the "photos_XXXXXXXX" folder called:

  • backdoor
  • driveway
  • guest
  • poolroom



I then went into each camera's settings and changed the upload folder to the appropriate one. For example, for my DCS-930L, under Setup > FTP, in the FTP Server section, I changed the path for the driveway camera to "/www/security/photos_XXXXXXXX/driveway" (again where "XXXXXXXX" is my particular unique folder name).

Also within Time Schedule section, I have "Enable uploading images to the FTP server" box checked. "Motion Detection" is selected. For the "Base file name", I put "Driveway_" but this is not mandatory; it just adds that to beginning of each file when created.

In the "File" section, I selected "Date/Time Suffix" and checked the box "Create subfolder by". I selected "1 day" from the drop-down menu. The beauty of this is that every day a new subfolder will be created (see above screenshot) which in turn will create a new sub-gallery in phpAlbum when phpAlbum scans all the folders for updates.

I then repeated the process for my other 3 cameras making sure that each was uploading to a unique path.



Once I did all this, I tested phpAlbum by going to http://security.mysite.com and voila! It displayed 4 galleries, one for each camera. Then I spent about 15 minutes configuring the app in the "Setup" section and getting familiar with it. I customized a ton of things like the site's name, theme, colors, layout, having it display the newest images automatically, as well as locking down the main screen so that a login was required in order to view anything.

Setup and configuration tips for phpAlbum.net
  • In Main setup, change default sorting to Date - Descending. Doing this will make all the most recent captures appear first.
  • Under Themes, I unchecked Show filenames since it cluttered up the screen. I unchecked the Show Search box because it's not needed.
  • Under Thumbnails, for all three sections on thumbnails settings (original, middle, small) I changed the Photos size/quality to 0/85 since I didn't want the uploaded images resized when displayed in the web browser. The images are natively 640x480 which is fine.
  • Under Galleries, for the main (root) gallery (shown as "/ (X)" where "X" is the number of photos in that gallery) I entered "12" for Show newest picture count. I love this option as it will automatically display the 12 most recent images from ALL of my cameras right there on the main page. Also, in the Access rights section, I unchecked "guest". Doing this will force a viewer to login using a valid account in order to see the images, otherwise anyone in the world who stumbles on "http://security.mysite.com" will have access to view all of your images! Now, notice the "Scan directories now!" function. If you click on this, phpAlbum.net will rescan all of your directories, create thumbnails, etc. Otherwise, it only runs automatically once every 24 hours. (There is a work-around to this limitation which I can post if anyone asks.)
  • Under Photo parameters, I unchecked the Default box displayed under every parameter listed except for the File name parameter which I selected an automatic value of Filename. You can customize this section to suit your particular needs.
  • Use the Users section to assign your users to the appropriate groups. In order to create a new user though, you have to logout as admin and then click Login followed by Register New User. It's a bit of a hassle but what do you want for FREE!?
  • Under Groups, you configure permissions. Green = enabled, Red = disabled. I personally disabled everything for the guest group and then only enabled Imageview for the Friends group. By default, I placed any accounts I had created into the Friends group. I deleted the rest of the groups.
  • Under Comment and Voting, I unchecked Enable comments.
  • Under E-Card, I unchecked Enable E-Cards since I highly doubt that I will ever email someone a surveillance photo, but you might, so hey, your call!

Well, that's pretty much it. So far, I have been VERY satisfied with phpAlbum's performance. I have also accessed my site with the web browser on my Android phone. Looks great.

If you have any questions, tips, or suggestions, please post them here.

Thanks!

Here are some screenshots of my site:

Main Gallery
Note how the newest images from all cameras appear on this page


"Guest Bedroom" Gallery
Notice the time-stamped sub-galleries on the left sorted by newest first
« Last Edit: March 24, 2011, 02:26:51 PM by TD99 »
Logged

trscons

  • Level 1 Member
  • *
  • Posts: 19

What a great tutorial! While I haven't tried on my own site(s) yet, the setup and outcomes look very good. Thanks for the effort to write this up.
Tom  :)
Logged

acellier

  • Level 4 Member
  • ****
  • Posts: 417

Sounds nice! And how do you keep the server from getting filled up? Does the php have a "delete after x days" option?
Logged

TD99

  • Level 2 Member
  • **
  • Posts: 74

I manually go in and delete folders, but with just the 1GB of storage I get online, it would take some time to fill up.

Images average 35k each, so that's about 28,500 images.
« Last Edit: April 07, 2011, 03:09:03 PM by TD99 »
Logged

TD99

  • Level 2 Member
  • **
  • Posts: 74

Update: I've been looking at other phpAlbum solutions online and found one that very basic and VERY simple to install. In fact, it's just ONE file that you upload.

Single File PHP Gallery 4.1.0
http://sye.dk/sfpg/

It lacks many of the features found in the phpAlbum.net solution I originally posted about such as logins, most recent photos, etc, but if all you're looking for is a simple, basic solution, this is it.

All you have to is place the single index.php file in a folder, and then all your images in subfolders. It takes care of the rest.

Here's the main HOME screen:


When I click on the [DRIVEWAY] gallery:


And when I select a date sub-gallery from there:


Again, very simple. Fast. And FREE.
« Last Edit: April 07, 2011, 03:23:55 PM by TD99 »
Logged

mrsr71

  • Level 2 Member
  • **
  • Posts: 86

Update: I've been looking at other phpAlbum solutions online and found one that very basic and VERY simple to install. In fact, it's just ONE file that you upload.

Single File PHP Gallery 4.1.0
http://sye.dk/sfpg/

It lacks many of the features found in the phpAlbum.net solution I originally posted about such as logins, most recent photos, etc, but if all you're looking for is a simple, basic solution, this is it.

All you have to is place the single index.php file in a folder, and then all your images in subfolders. It takes care of the rest.

Here's the main HOME screen:


When I click on the [DRIVEWAY] gallery:


And when I select a date sub-gallery from there:


Again, very simple. Fast. And FREE.

I followed all of the instructions but, how do you view the images  ??? ???

Do I need to construct a web page  ??? ???
Logged

TD99

  • Level 2 Member
  • **
  • Posts: 74

I followed all of the instructions but, how do you view the images  ??? ???

Do I need to construct a web page  ??? ???

You need to enter the full address of the gallery in your web browser.

For example, if your website is "www.foo.com" and your gallery is stored in a folder called "pics" on that web server, you need to go to "www.foo.com/pics".
Logged

mrsr71

  • Level 2 Member
  • **
  • Posts: 86

You need to enter the full address of the gallery in your web browser.

For example, if your website is "www.foo.com" and your gallery is stored in a folder called "pics" on that web server, you need to go to "www.foo.com/pics".

This is all I get so it must be an Earthlink issue(?)

Logged

TD99

  • Level 2 Member
  • **
  • Posts: 74

This is all I get so it must be an Earthlink issue(?)



Which folder is the "index.php" file in?
Logged

mrsr71

  • Level 2 Member
  • **
  • Posts: 86

Which folder is the "index.php" file in?

It's in the "PHP Gallery" folder.
Logged

TD99

  • Level 2 Member
  • **
  • Posts: 74

Then you need to enter your website's URL plus the "PHP Gallery" folder. Although I don't recomend using a space. Rename the folder to use an underscore instead.

www.yourwebsite.com/php_gallery
Logged

mrsr71

  • Level 2 Member
  • **
  • Posts: 86

Then you need to enter your website's URL plus the "PHP Gallery" folder. Although I don't recomend using a space. Rename the folder to use an underscore instead.

www.yourwebsite.com/php_gallery

I did exactly as you said and it's still doesn't work. I betcha is a Earthlink server issue. Oh well, the D-Link software still works well.
Logged

JavaLawyer

  • BETA Tester
  • Level 15 Member
  • *
  • Posts: 12190
  • D-Link Global Forum Moderator
    • FoundFootageCritic

Did you search Earthlink technical support for any special conditions or requirements for executing PHP scripts?  Depending on the scripting language, some providers require actively enabling the scripting functionality on the admin back-end or have special naming/pathing conventions.

If you're paying an annual hosting fee, then you may have some level of telephone support for technical questions.
« Last Edit: May 20, 2011, 05:55:47 AM by JavaLawyer »
Logged
Find answers here: D-Link ShareCenter FAQ I D-Link Network Camera FAQ
There's no such thing as too many backups FFC

TD99

  • Level 2 Member
  • **
  • Posts: 74

Can we move this topic to the DCS-930L thread? That's what I intended it for.
Logged

JavaLawyer

  • BETA Tester
  • Level 15 Member
  • *
  • Posts: 12190
  • D-Link Global Forum Moderator
    • FoundFootageCritic

Can we move this topic to the DCS-930L thread? That's what I intended it for.

Sure. . .
Logged
Find answers here: D-Link ShareCenter FAQ I D-Link Network Camera FAQ
There's no such thing as too many backups FFC
Pages: [1] 2