Changing File ext. to File

Posted by haleyhosting_com, 03-24-2007, 01:31 PM
i have a site upithere.com . its a pretty popular photo hosting site. what i want to do is .. when a pic is uploaded to put some kind of watermark on it. like "Hosted at UpItHere.com". i have no clue how to do this automaticly in php so i could do it the manual way. now on the server when the files are uploaded.... say someone uploaded 1.jpg .. in the uploads folder it would just have a file there named one. so i downloaded this file. and gave it an extension of jpg and that did the trick i could view the image. now i can manualy add a little watermark to it. but now inorder to it to work i have to somhow save the file without an ext. so when you right click on it and go to properties to view the ext. it just says File ....................................anyone have a clue?

Posted by zwolf, 03-24-2007, 02:35 PM
Im not sure that I really understand what you are asking, but if you are trying to simply remove a files extension manually, you can simply remove the extension using Windows Explorer (If using Windows). Click rename and then simply remove the extension. I tried checking your site to see what you were refering to, but the page froze on your hosted image page. The method your using of manually downloading and adding a watermark sounds like it is going to be very time consuming for you if your site gets very busy. Check this link: http://tips-scripts.com/?tip=watermark#tip - A script to automatically add a watermark to images, I have never used it, but hopefully it will work for you. Sorry, had to mention this: Your slogan currently reads: "Free, Fast and Free" - just a suggestion, how about: Fast, Free & Easy! -? Might make a little more sense. Lots of luck. Last edited by zwolf; 03-24-2007 at 02:43 PM.

Posted by bleenzorb, 03-25-2007, 07:22 AM
Are you messing with the filename extension simply to prevent a client from accessing the jpg until it has had a watermark applied? If that's the case, here's a better solution, I think: simply name a directory something cryptic, like "uploads0982345". Go ahead and set the permissions on that dir to 755 so the server can still get to it, but users won't know its URL (because of the cryptic directory name). Upload new images there. When you add the watermark, move the file to another directory that users do know about. Watermarking with PHP is pretty easy and there are lots of options. Just do a search.

Esta resposta foi útil?

 Imprimir este Artigo

Leia também

mysql question

Posted by stuffradio, 03-22-2007, 01:21 AMI want to make a member id thing. Example: Member001...

PERM_FAILURE: SMTP Error (state 14)

Posted by Fahd, 03-29-2008, 05:42 PMMy mailserver has stopped accepting mail from all non-local...

Email issue

Posted by manindarkjp, 03-30-2008, 08:31 AMHello, I have a dedicate server and got a problem...

File Integrity Check

Posted by taydu3000, 01-15-2008, 04:01 AMAre the following file from Cpanel? Cpanel just update...

Help wanted: ASP.NET / mono setup

Posted by raqtweak.com, 03-25-2007, 10:52 AMHi all, I'm looking for volounteers for the...