boo_lolly Posted March 12, 2007 Share Posted March 12, 2007 i'm creating a website (have not even began coding) for a photographer. however, he does not want one site for all of his clients, he wants me to create a new site for each of his clients, which i have no problem doing. however the upload, and search forms will be the same on each of his client's sites. the photographer said the client does NOT want to require registered user access, he wants it to be entirely public. each of these sites i will be hosting on my own apache server, by the way. this is where i need a little advice... 1) do i need an image library like gd library or image majick? i believe i do, because i have every intention on creating thumbnails upon image upload. if so, which one would you advise to use and why? 2) what method of storing these photos would you recommend i use? i've never done this before so i really have no idea where to begin. would i turn apache into a file server, and then upload the images to the file server through the upload form, then use a mysql database to store the names of the images, and browse through them using the names appended to the path to the file server? or does the image library store the images? which would be faster? other than that (which is the most important parts of developing this site) i've got no problem setting up the search tool or browsing or anything like that. i just need a little information on how it will all work 'behind the scenes' and i can take it from there. thanks! Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/ Share on other sites More sharing options...
donynam Posted March 12, 2007 Share Posted March 12, 2007 ask what he wants, do what he wants. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205525 Share on other sites More sharing options...
boo_lolly Posted March 12, 2007 Author Share Posted March 12, 2007 ask what he wants, do what he wants. i did ask what he wanted aesthetically. he doesn't care how it's done behind the scenes. it is up to me to decide how it will function. if you've ever done free-lance work you'd know people don't care how it works, they just want it to look the way they want it to look. he is a photographer, not a developer. you are a tard. don't post unnecessary comments because it wastes space. and you are taking up too much air. get out of my thread. anybody else have a worthy suggestion? Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205533 Share on other sites More sharing options...
obsidian Posted March 12, 2007 Share Posted March 12, 2007 ask what he wants, do what he wants. That's completely wasted space. Take the time to read a question thoroughly and develop a somewhat thoughtful response, please. It doesn't take much to understand what the OP is after for support on this one. @boo_lolly - Does he actually want a full domain and everything registered for each individual client he has, or is he just after a fully customizable solution geared towards each individual? If it's the former, I'd recommend pointing out to him that it's a nightmare to keep up with all the domains and registration information when you start getting into dozens (each belonging to a separate client). My recommendation would be to point him towards a customizable dynamic solution where each client has their own subdomain or folder that is customized to them. For instance, if I were to log in and be forwarded to www.myphotosite.com/obsidian, as far as a client perspective, that's as far as I really care. The beauty of that is that using mod rewrite, that could actually be www.myphotosite.com/?uid=obsidian. See where I'm headed? If you can get him to use that type of customization, you could even provide a new CSS for each client, but the underlying code would be identical, and actually running from the same location. That would by far be my suggestion. If he is as flexible as you say, I really think he would be willing to consider it (seeing that it will be a much more reasonable solution financially for him as well) As for actually storing the photos, yes, I would definitely require GD to run something workable. This way, you can get from him the sizing of the photos and resize them or generate thumbnails on the fly. If you record each image that is uploaded to an individual user, you can even store them all in the same folder as long as they are properly referenced in your database. Hope that helps. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205539 Share on other sites More sharing options...
donynam Posted March 12, 2007 Share Posted March 12, 2007 i did ask what he wanted aesthetically. he doesn't care how it's done behind the scenes. it is up to me to decide how it will function. if you've ever done free-lance work you'd know pe.. My god, as a free-lancer you take a project that you don't know how to do ? I though you already come out with a solution. Therefore, just now I suggested you to focus on what the customer need. Sorry for that. But anyway, this is your business, outsider cannot help you to earn money. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205550 Share on other sites More sharing options...
boo_lolly Posted March 12, 2007 Author Share Posted March 12, 2007 @donynam: as a developer, i provoke taking on projects i do not yet know how to do. i see it as an opportunity to become a better developer. i do not bill the customer for the time i spent learning how to program their desired applications. and by the end of it all, i've acquired yet another project in my portfolio, and am more effective the next time around. @obsidian: he has his own site, but each client wants their own domains. i told him the same thing, i could even do a mod-rewrite and have hostnames for his clients, but his clients didn't want that. his clients will be paying for their own domains and whatnot, i will be serving thier sites on my own server. i probably didn't explain the situation well enough, so let me append some data... i'll give you an example of the first site i'm working on for this photographer. he was hired to take photos for a wedding. however, all of the guests themselves took their own digital photos. since these different guests live in different areas of the world, they wanted their own website where they could each go online and upload their own images to the site, and then browse them and search for specific photos. i assumed the names would be stored in a mysql database, but i've got no idea how to handle the files themselves. so basically, there will be an admin page where they can upload, rename, and delete photos. then there will be a browse and search images dynamically. this admin page is actually public, just like the browse and search pages. however, to authenticate the users browsing the site i will be using an apache certificate with a username and password where every member of the family can type in the same username and password and immediately have access to the entire site (admin AND public pages). does that make sense? this is the way the photographer's clients want it to be done. so, i know how to do the user authentication, i know how to write a search tool, i know how to display results dynamically... but i have never worked with file uploads and storage and deletion and renaming, or gd library. so, that is really what i need help with. does that help a little? Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205597 Share on other sites More sharing options...
boo_lolly Posted March 12, 2007 Author Share Posted March 12, 2007 i'm not one that condones bumping, but i really do need help with this situation. at least tell me what functions you guys think i should look into, or functions you know i'll need. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205689 Share on other sites More sharing options...
bwochinski Posted March 12, 2007 Share Posted March 12, 2007 Handling image uploads is really a lot easier than you'd think. If you haven't, of course read the php docs on it (http://us2.php.net/manual/en/features.file-upload.php). They have several demo chunks to get you started there. Of course, as noted on that page, much of the data about the presumably uploaded image is not checked, so be sure to check things out before saving the uploaded file. One function for that kind of thing is getimagesize(), and browse around the related functions for some more info. I too would probably put all of the images in one folder, and reference the filenames from the database. Of course you're going to need to be able to guarantee unique filenames to avoid problems, for that I'd probably do something of the format: "timestamp-filenamehash.gif" and then just save the original filename in the database. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205701 Share on other sites More sharing options...
boo_lolly Posted March 12, 2007 Author Share Posted March 12, 2007 thanks bwochinski. that proves great advice. i'll look into that and if i have specific questions, i'll post in another thread. Link to comment https://forums.phpfreaks.com/topic/42368-upload-images-to-be-browsed-by-site-users-where-to-begin/#findComment-205705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.