Hello folks!
I've got a strange problem with my download-script in conjunction with
M$ internet explorer, if the filename I want to link to includes more
than one points. In Netscape the problem doesn't exist.
For example:
input: ... download.php?na me=virtualdub_1 .4.9.zip -
header("Content-Type: application/octet-stream");
-
header("Content-Length: " . filesize($file));
-
header("Content-Disposition: attachment; filename=".$name);
-
header("Content-Transfer-Encoding: binary");
-
output: ... save file to disk: virtualdub_1[1].4.9.zip
Plz hlp! Thx.
Kornelius F. 7 4013
Kornelius Finkenbein <ko***@web.de > wrote in message news:<bp******* *****@news.t-online.com>... Hello folks!
I've got a strange problem with my download-script in conjunction with M$ internet explorer, if the filename I want to link to includes more than one points. In Netscape the problem doesn't exist.
For example:
input: ... download.php?na me=virtualdub_1 .4.9.zip
- header("Content-Type: application/octet-stream");
- header("Content-Length: " . filesize($file));
- header("Content-Disposition: attachment; filename=".$name);
- header("Content-Transfer-Encoding: binary");
-
output: ... save file to disk: virtualdub_1[1].4.9.zip
Try this:
<?php
header('Content-Type: XXXXXXXXXXXXXX' );
//IE need specific header
if (strstr($_SERVE R['HTTP_USER_AGEN T'], "MSIE"))
{
header('Content-Disposition: inline; filename="'.$fi le_name.'"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
}
else
{
header('Content-Disposition: attachment;
filename="'.$fi le_name.'"');
header('Pragma: no-cache');
}
?>
If it doesn't work read the usernotes at http://in.php.net/header
that may be helpful.
---
"War kills you and me"
Email: rrjanbiah-at-Y!com
Thanks for your help, but that didn't solve the problem yet.
I've looked on http://in.php.net/header and searched again in Google,
but I can't find a solution for it.
Perhaps it's the best to eliminate all points in filename except the
last one of course.
Thx. Kornelius
R. Rajesh Jeba Anbiah schrieb: Kornelius Finkenbein <ko***@web.de > wrote in message news:<bp******* *****@news.t-online.com>...
Hello folks!
I've got a strange problem with my download-script in conjunction with M$ internet explorer, if the filename I want to link to includes more than one points. In Netscape the problem doesn't exist.
For example:
input: ... download.php?na me=virtualdub_1 .4.9.zip
- header("Content-Type: application/octet-stream");
- header("Content-Length: " . filesize($file));
- header("Content-Disposition: attachment; filename=".$name);
- header("Content-Transfer-Encoding: binary");
output: ... save file to disk: virtualdub_1[1].4.9.zip
Try this:
<?php header('Content-Type: XXXXXXXXXXXXXX' ); //IE need specific header if (strstr($_SERVE R['HTTP_USER_AGEN T'], "MSIE")) { header('Content-Disposition: inline; filename="'.$fi le_name.'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Content-Disposition: attachment; filename="'.$fi le_name.'"'); header('Pragma: no-cache'); } ?>
If it doesn't work read the usernotes at http://in.php.net/header that may be helpful.
--- "War kills you and me" Email: rrjanbiah-at-Y!com
Kornelius Finkenbein <ko***@web.de > wrote in message news:<bp******* ******@news.t-online.com>... Thanks for your help, but that didn't solve the problem yet. I've looked on http://in.php.net/header and searched again in Google, but I can't find a solution for it.
Perhaps it's the best to eliminate all points in filename except the last one of course.
I dont' think, it will help you. Just checked phpMyAdmin; it also
has the same problem with zip. If even phpMyAdmin guys couldn't solve
this problem, I don't think it's possible. Anyway, you keep on trying.
Probably some HTTP sniff will be useful to you.
---
"Believe it or not, patriotism is one of the worst dividing forces"
Email: rrjanbiah-at-Y!com ng**********@re diffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<ab******* *************** ****@posting.go ogle.com>... Kornelius Finkenbein <ko***@web.de > wrote in message news:<bp******* ******@news.t-online.com>... Thanks for your help, but that didn't solve the problem yet. I've looked on http://in.php.net/header and searched again in Google, but I can't find a solution for it.
Perhaps it's the best to eliminate all points in filename except the last one of course.
I dont' think, it will help you. Just checked phpMyAdmin; it also has the same problem with zip. If even phpMyAdmin guys couldn't solve this problem, I don't think it's possible. Anyway, you keep on trying. Probably some HTTP sniff will be useful to you.
I checked Yahoo! It doesn't have this problem and so worked on
the headers... Finally found the solution!!!! Now, it works fine!!!
<?php
//This file name: download_zip.ph p
//Tested in IE6
$filename = "rajesh.zip ";
header('Content-Type: application/x-zip-compressed;
filename="foo.b ar"');
header('Content-Disposition: attachment; filename="' . $filename .
'"');
readfile($filen ame);
exit;
?>
<!---html file name: test.html--->
<a href="download_ zip.php">test</a>
Now, open the test.html and click the link. Please confirm, if
it's work for you.
---
"Believe it or not, patriotism is one of the worst dividing forces"
Email: rrjanbiah-at-Y!com
Don't know if you understood my problem: I have no problem with the
download-script in conjunction with zip-files. The problem exists only,
if files have more than one point in the filename: f.e.
"virtualdub_1.5 .9.zip". Before the first point I get this: "[1]".
The result is this filename: "virtualdub _1[1].5.9.zip".
Your filename "rajesh.zip " has only one point, thats no problem.
BTW, I could not open a test.htm. There were no attachment or link.
But thanks anyway for all.
Kornelius.
I checked Yahoo! It doesn't have this problem and so worked on the headers... Finally found the solution!!!! Now, it works fine!!!
<?php //This file name: download_zip.ph p //Tested in IE6
$filename = "rajesh.zip "; header('Content-Type: application/x-zip-compressed; filename="foo.b ar"'); header('Content-Disposition: attachment; filename="' . $filename . '"'); readfile($filen ame); exit; ?>
<!---html file name: test.html--->
<a href="download_ zip.php">test</a> Now, open the test.html and click the link. Please confirm, if it's work for you.
--- "Believe it or not, patriotism is one of the worst dividing forces" Email: rrjanbiah-at-Y!com
On Mon, 17 Nov 2003 12:11:10 +0100, Kornelius Finkenbein wrote: Don't know if you understood my problem: I have no problem with the download-script in conjunction with zip-files. The problem exists only, if files have more than one point in the filename: f.e. "virtualdub_1.5 .9.zip". Before the first point I get this: "[1]". The result is this filename: "virtualdub _1[1].5.9.zip".
Your filename "rajesh.zip " has only one point, thats no problem. BTW, I could not open a test.htm. There were no attachment or link.
But thanks anyway for all. Kornelius.
I checked Yahoo! It doesn't have this problem and so worked on the headers... Finally found the solution!!!! Now, it works fine!!!
<?php //This file name: download_zip.ph p //Tested in IE6
$filename = "rajesh.zip "; header('Content-Type: application/x-zip-compressed; filename="foo.b ar"'); header('Content-Disposition: attachment; filename="' . $filename . '"'); readfile($filen ame); exit; ?>
<!---html file name: test.html--->
<a href="download_ zip.php">test</a> Now, open the test.html and click the link. Please confirm, if it's work for you.
--- "Believe it or not, patriotism is one of the worst dividing forces" Email: rrjanbiah-at-Y!com
Are you sure you don't have a file already called (whatever it was you were
trying to download) already? Usually the [1] comes when some program (like
IE) has to give a downloaded file a new name because the current file
already exists.
Also, have you tried the page in other browsers? If it works in something
else, it's probably just some sort of client-side problem. You could also
get a header-sniffer to see what the actual filename the script is giving
you is.
--
-- Rudy Fleminger
-- sp@mmers.and.ev il.ones.will.bo w-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Kornelius Finkenbein <ko***@web.de > wrote in message news:<bp******* ******@news.t-online.com>... Don't know if you understood my problem: I have no problem with the download-script in conjunction with zip-files. The problem exists only, if files have more than one point in the filename: f.e. "virtualdub_1.5 .9.zip". Before the first point I get this: "[1]". The result is this filename: "virtualdub _1[1].5.9.zip".
Sorry for misunderstandin g your problem. Yes, it seems to dislike
the extra points in file name. It's really strange.
---
"War kills you and me"
Email: rrjanbiah-at-Y!com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Doug |
last post by:
I can't get a form coding to recognize a download.php to download a file to
the client. I need the edits of the form for a MySQL table, but the
following form code only wants to download 'download.php' and won't access
download.php so the code can take affect. How can the action item call
download.php?
<form name="form1" method="post" action="download.php"
onSubmit="
...
|
by: chon |
last post by:
I have an ASP page that is sent a file location as a parameter. It opens
this file, loads the ADODB.Stream object and does a binary write to the page
forcing the download dialog to appear. This all works fine. If the user
selects "Open" or "Cancel", the window closes, which is the desired behavior.
If they select "Save", the location dialog shows up, they save the file and
the window remains open. I've tried a number of things to get...
|
by: Sarah Akers |
last post by:
GgF
----gL5cJ72EqiGIQ0SK65Rz
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style type=3D"text/css">.eyebrow { FONT-WEIGHT: bold; FONT-SIZE: 10px; TE=
|
by: Anne Snow |
last post by:
7qs
----bSCMEc0pLIbJxmV9
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE=
: 10px; TEXT-TRANSFORM: uppercase; COLOR: #ffffff; FONT-FAMILY: verdana,ar=
ial,helvetica,sans-serif; TEXT-DECORATION: none } A.eyebrow:link { TEXT-DE=
CORATION: none }</style><title>6</title><meta http-equiv=3DContent-Type co=
|
by: Tom |
last post by:
Hi,
I have a website providing pdf file downloading for registered member.
Member needs to login and be able to download pdf file.
I save pdf file in a directory. e.g. http://www.downloadpdf.com/pdf/abc.pdf
However, I needs to restrict those non-member to download the pdf file
directly by input the URL http://www.downloadpdf.com/pdf/abc.pdf.
| |
by: Al |
last post by:
Hi!
I try to use custom download page (download.aspx) wich writes file (about
700Mb) to response. But I can download only one file from one IP at the same
time.
I think that this is IIS or ASP.NET limits but I'm not sure.
How can I fix this or change limits?
Thanks
|
by: kain razial |
last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT
TEKLA XSTEEL V 12 DOWNLOAD LINK.
http://www.sendspace.com/file/zem32r
|
by: kain razial |
last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT
TEKLA XSTEEL V 12 DOWNLOAD LINK.
http://www.sendspace.com/file/zem32r
|
by: JayLembeck |
last post by:
Over 50,000 Free Ringtone. Get the Latest Ringtone. Download now- Fast, Free and Easy. Get your FREE surprise RINGTONE now! http://seekoutfast.info/free-ringtone/ free ringtone free ringtone new ringtone popular ringtine download ringtone download verizon ringtone download cingular ringtone download mosquito ringtone download mp3 ringtone download nextel ringtone download verizon ringtone download nokia ringtone download midi ringtone mobile...
|
by: naza |
last post by:
Before I start I would just like to say that I am totally new to
programming so the things that I am going ask probally will sound
basic and I might sound I bit ambitious in what I want to do.
The problem I have is that I have two network adapters connected to
different internet connections now I want to use both connections when
I download files from rapidshare. I have looked at the options of dual
Wan routers and for the price I don't...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |