PHP - filename editing on the fly. - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: PHP - filename editing on the fly. (/showthread.php?tid=86758) PHP - filename editing on the fly. by Nathan on 10-19-2008 at 10:33 PM
Okay so here's the situation. RE: PHP - filename editing on the fly. by Mike on 10-19-2008 at 10:42 PM mod_rewrite? RE: PHP - filename editing on the fly. by Nathan on 10-19-2008 at 10:43 PM How would that work? I have over 300 programs + skins that need to change on the fly... RE: PHP - filename editing on the fly. by Eljay on 10-19-2008 at 10:46 PM
If you currently download it with PHP, e.g. content-disposition and not just a direct link: RE: PHP - filename editing on the fly. by ShawnZ on 10-19-2008 at 10:50 PM
header("Content-Disposition: attachment; filename=<whateverfilename>"); RE: PHP - filename editing on the fly. by Nathan on 10-19-2008 at 10:52 PM
I'll give you an idea of what I mean just before I try any of these methods (short on time, I have not alot of time to fiddle): RE: PHP - filename editing on the fly. by Mike on 10-20-2008 at 05:24 AM
quote:Well, your upload script could automatically add a mod_rewrite entry on your .htaccess as soon as a file is uploaded. But this is a very bad solution because your .htaccess file will soon be filled with many entries, possibly making the server slower. quote:No it won't It will redirect me to an external link. Some other issues with the site too: Text is cut off. The resolution of the screenshot in the above link messes up the pictures aspect ratio Also, remove that static background It makes Firefox cry RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 08:08 AM
Meh thats because you have a shitty resolution, it works okay for 1024x768 and upwards. RE: PHP - filename editing on the fly. by NanaFreak on 10-20-2008 at 08:10 AM
why not just make it go to a php file that has the random filename as a parameter then just do the header stuff to get it to download the file? RE: RE: PHP - filename editing on the fly. by ryxdp on 10-20-2008 at 09:05 AM
quote: use background-attachment: scroll; it makes scrolling a hell of a lot easier RE: PHP - filename editing on the fly. by John Anderton on 10-20-2008 at 10:10 AM
offtopic: scrolling is kinda laggy but its fine. The background has no issues. RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 10:13 AM
No, I want the background to stay in view at all time and not move and repeat... That's the desgin. Anyway were going off topic... RE: PHP - filename editing on the fly. by thorerik on 10-20-2008 at 10:23 AM
as eljay said: RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 03:11 PM
I currently use a header to fetch the file. code: That's whats in my download page (minus the counter). Help RE: PHP - filename editing on the fly. by Dempsey on 10-20-2008 at 04:05 PM
code: RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 05:52 PM
Yeah but not all of them are zip, this is the complication. It can be exe, cabs, zip, rars and the list goes on... RE: PHP - filename editing on the fly. by Lou on 10-20-2008 at 09:17 PM
quote:You could very easily change that to use a variable, and grab the random file name, run it through the database, match with the new filename, output that, and bam. RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 09:32 PM
I see, like explode() it to get the file extension, and then do it that way. Hmm I thought there would be an easier way RE: PHP - filename editing on the fly. by Eljay on 10-20-2008 at 09:44 PM
quote: Or just use basename RE: PHP - filename editing on the fly. by Nathan on 10-20-2008 at 09:54 PM
How would that work? If I want to just get the file extension and add a totally different filename RE: PHP - filename editing on the fly. by hmaster on 10-21-2008 at 10:14 AM
code: RE: PHP - filename editing on the fly. by Mike on 10-21-2008 at 10:48 AM
quote:I use 1024x768. Scrolling is just way too slow. RE: PHP - filename editing on the fly. by hmaster on 10-21-2008 at 11:45 AM Mine is 1440x900 and it's still a bit choppy. RE: PHP - filename editing on the fly. by Nathan on 10-21-2008 at 12:41 PM Mines 1440x900 and it all depends on the gpu. My 8800gtx works fine with it. RE: PHP - filename editing on the fly. by Mike on 10-21-2008 at 12:51 PM
quote:But not everyone's got an 8800... RE: PHP - filename editing on the fly. by Nathan on 10-21-2008 at 02:58 PM My intel gpu on this thing works fine with it as well RE: PHP - filename editing on the fly. by Mike on 10-21-2008 at 10:40 PM
quote:Just try it on a computer that was bought on 2002 RE: PHP - filename editing on the fly. by Nathan on 10-21-2008 at 10:41 PM
Okay, lol, we're going off topic, I might update it. RE: PHP - filename editing on the fly. by NanaFreak on 10-22-2008 at 03:20 AM
quote:what would work perfect... all you have to do is change the download page to go to that php page =\ [offtopic] i have had to adblock the background image as the lag was so bad... nvidia 6200... not everyone has alot of money to buy a decent graphics card remember.. RE: PHP - filename editing on the fly. by ShawnZ on 10-22-2008 at 03:38 AM uh, does graphics card really matter when websites aren't accelerated anyway RE: PHP - filename editing on the fly. by Nathan on 10-24-2008 at 07:08 PM
So why does it work fine for some computers and not? RE: PHP - filename editing on the fly. by vaccination on 10-24-2008 at 07:17 PM
quote:er, memory, cpu? RE: PHP - filename editing on the fly. by Nathan on 10-24-2008 at 07:21 PM Yeah, my mums old old laptop (90mhz cpu, 128mb of ram) runs it fine... RE: PHP - filename editing on the fly. by Spunky on 10-25-2008 at 09:23 AM
quote: As long as only you and her are the only ones that visit the site, you'll be OK then RE: PHP - filename editing on the fly. by -dt- on 10-25-2008 at 09:51 AM
quote:pretty much a given RE: PHP - filename editing on the fly. by Nathan on 10-25-2008 at 10:30 AM
Pfft, I get plenty of visitors every day, especially for a site that I don't add content anymore. I have admins that add content. I just check the admin panel occasionally for emails and such. RE: PHP - filename editing on the fly. by NanaFreak on 10-25-2008 at 12:31 PM
quote:well we have given you something that will defiantly work... |