PHP - filename editing on the fly. |
Author: |
Message: |
John Anderton
Elite Member
Posts: 3908 Reputation: 80
37 / /
Joined: Nov 2004
Status: Away
|
RE: PHP - filename editing on the fly.
offtopic: scrolling is kinda laggy but its fine. The background has no issues.
SOMEONE FUCKING FIX MY WIZARD SO I CAN GET TO WORK ON TOUCH INNOVATION
* John Anderton runs back to studies for his on going exams
[
KarunAB.com]
[img]http://gamercards.exophase.com/459422.png[
/img]
|
|
10-20-2008 10:10 AM |
|
|
Nathan
Veteran Member
Yeah, "large dimensions" ;)
Posts: 2984 Reputation: 76
– / /
Joined: Apr 2005
|
O.P. RE: PHP - filename editing on the fly.
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...
Help
EDIT: Thanks JA , yeah get it fixed whore
This post was edited on 10-20-2008 at 10:13 AM by Nathan.
|
|
10-20-2008 10:13 AM |
|
|
thorerik
New Member
One random php dude
Posts: 2
34 / /
Joined: Oct 2008
|
RE: PHP - filename editing on the fly.
as eljay said:
header('Content-Disposition: attachment; filename="Messenger.zip"');
should do the trick(as i use it on my own download script)
|
|
10-20-2008 10:23 AM |
|
|
Nathan
Veteran Member
Yeah, "large dimensions" ;)
Posts: 2984 Reputation: 76
– / /
Joined: Apr 2005
|
O.P. RE: PHP - filename editing on the fly.
I currently use a header to fetch the file.
Basically when you click download it goes to the download page, which then fetches the id, and searches the db and finds relative results. It then headers it to the file (after adding +1 to the download counter).
So I tried using the Content-Disposition, but it doesn't work properly .
code: header("Location: {$download}");
That's whats in my download page (minus the counter).
Help
|
|
10-20-2008 03:11 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: PHP - filename editing on the fly.
code: header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="download.zip"');
readfile($download);
|
|
10-20-2008 04:05 PM |
|
|
Nathan
Veteran Member
Yeah, "large dimensions" ;)
Posts: 2984 Reputation: 76
– / /
Joined: Apr 2005
|
O.P. RE: PHP - filename editing on the fly.
Yeah but not all of them are zip, this is the complication. It can be exe, cabs, zip, rars and the list goes on...
I tried that originally (what you posted dempsey).
Thanks though
|
|
10-20-2008 05:52 PM |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
Joined: Aug 2004
|
RE: PHP - filename editing on the fly.
quote: Originally posted by Nathan
Yeah but not all of them are zip, this is the complication. It can be exe, cabs, zip, rars and the list goes on...
I tried that originally (what you posted dempsey).
Thanks though
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.
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
|
|
10-20-2008 09:17 PM |
|
|
Nathan
Veteran Member
Yeah, "large dimensions" ;)
Posts: 2984 Reputation: 76
– / /
Joined: Apr 2005
|
O.P. RE: PHP - filename editing on the fly.
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
Ah well, looks like I'll be doing it like that. Unless anyone else wants to post a sollution?
|
|
10-20-2008 09:32 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: PHP - filename editing on the fly.
quote: Originally posted by Nathan
I see, like explode() it to get the file extension
Or just use basename
|
|
10-20-2008 09:44 PM |
|
|
Nathan
Veteran Member
Yeah, "large dimensions" ;)
Posts: 2984 Reputation: 76
– / /
Joined: Apr 2005
|
O.P. RE: PHP - filename editing on the fly.
How would that work? If I want to just get the file extension and add a totally different filename
I'm confusing myself now
|
|
10-20-2008 09:54 PM |
|
|
Pages: (4):
« First
«
1
[ 2 ]
3
4
»
Last »
|
|