Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 08-25-2008, 12:34 PM
Shifty Shifty is offline
Hatchling Croc
 
Join Date: Oct 2004
Posts: 27
Default web based ftp?

I have Zenphoto setup behind password protection for family photo sharing. It's supposed to be an easy for family to share their photos, all they need to do is ftp into the website, or log in then upload.

However this has been troublesome for some. Any anyone recommend some code that I can use to allow someone to upload files into specific directories? I did a websearch, but was overwhelmed by the number of responses.

I'd like to modify the Zenphoto php pages to have a link that says "upload here" and all they have to do is click it, select the files to upload, and click "finish". Easy, and secure enough since it's all behind a password protection.

Eric
Reply With Quote
  #2  
Old 08-25-2008, 01:07 PM
kompreszor's Avatar
kompreszor kompreszor is offline
Swamp Croc
 
Join Date: Jun 2007
Location: Pennsylvania, USA
Posts: 330
Default Re: web based ftp?

Why don't you make Zenphoto user accounts for them and assign them upload rights? Would be much easier then ftp.
__________________
“There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance—that principle is contempt prior to investigation.”
—Herbert Spencer
Reply With Quote
  #3  
Old 08-25-2008, 01:28 PM
gwyneth's Avatar
gwyneth gwyneth is offline
Supreme Croc
 
Join Date: Sep 2006
Location: up north
Posts: 6,843
Default Re: web based ftp?

Kompreszor has an excellent suggestion. It does sound like a user rights issue. The overview in the zenphoto docs is very helpful:

Zenphoto » User Guide

Also, which version are you using?
Reply With Quote
  #4  
Old 08-25-2008, 01:47 PM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: web based ftp?

If you really want to know how to upload a file using PHP have a look here : http://ca.php.net/manual/en/features.file-upload.php

Something not mention there is the possibility of hacking with a non-filtered filename, be sure to use something like this to protect yourself:

if( preg_match('#[\x00-\x1F\x7F-\x9F/\\\\]#', $file_name) )
{
exit("Invalid FileName");
}
Reply With Quote
  #5  
Old 08-25-2008, 02:44 PM
Shifty Shifty is offline
Hatchling Croc
 
Join Date: Oct 2004
Posts: 27
Default Re: web based ftp?

I recently upgraded to v1.2.

I have assigned usernames/logins, even a simple generic one for anyone to use. The problem is after logging in, they're taken to another page, then they have to find the page to upload to, and at this point they basically say HUH. I even made instructions, encircling the things they should click. A few people are eager to learn, but most don't want to bother with something "so complex". Many are scared of using the message board ...

All Zenphoto requires is a picture in a directory, and it does everything automatically -- great! So if I make a simple script and add it to the album view page, "Click here to share a picture", then they just click and poof, it's done, nice and easy. I'm just trying to make it easy for people who "just don't get computers".

Thanks for the php code -- that might just work, and it's simple. I was hoping to combine the FTP user account with the webpage, but this might be better. Edit: FTP_PUT might actually be better and easier in this situation: http://ca.php.net/manual/en/function.ftp-put.php

Eric

Last edited by Shifty; 08-25-2008 at 02:50 PM.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UK based users cludgie Pre-Sales Questions 16 11-11-2010 11:06 PM
US Based Company? crashnet47 Pre-Sales Questions 2 07-07-2008 04:42 PM
running an ASP-based site at HG? notecat Pre-Sales Questions 24 04-09-2007 02:55 PM
Web-based Serial Novel yuro1981 Site Promotion 0 02-11-2007 03:00 PM

All times are GMT -5. The time now is 10:54 AM.