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.

Ця відповідь Вам допомогла?

 Роздрукувати цю статтю

Також прочитайте

grsec WARNING: No module mptscsi found for kernel 2.6.22.9-grsec, continuing anyway

Posted by uploadalerts, 03-27-2008, 04:46 PMHi, I see the following error, while trying to...

Reseller account with H-Sphere?

Posted by dontknownutn, 09-04-2002, 10:02 PMWhere can I get a private label reseller package with...

iframe help with internet explorer

Posted by galleline, 02-20-2011, 10:05 AMI have web page with embed video player and i have put...

identd daemon

Posted by HD Fanatic, 07-15-2007, 03:48 PMWhat's the most popular identd daemon for Linux? I need...

DirectAdmin email forwarding not forwarding

Posted by river1, 06-30-2008, 07:20 AMI had email forwarding from a site that I am running on a...