Greetings!
In my PHP website I'm trying to raise a File Download dialog directly
in a WindowsCE IE client with the following code:
header( "Content-Type: application/octet-stream\n" );
header( "Content-Disposition: attachment; filename=\"$fil e\"\n" );
header( "Content-Transfer-Encoding: binary\n" );
header( "Content-Length: " . filesize($path. $file) . "\n" );
The dialog does appear, but instead of prompting the user to save a
something.zip filename (for instance) it prompts him to save a file
called script.php (the name of the script that has this code). This is
very strange, since I know that this code is the cookbook approach to
do this, and it works perfectly in all PC browsers that I know of. It
seems that WindowsCE IE completely ignores the filename attribute in
the Content-Disposition HTTP header... :-(
I've been suggested to feed the link directly to the client, through
header("Locatio n: ..."). I did try that, but instead of a dialog, the
client browser just displays the binary file in the HTML page...
Is there a PHP workaround to using the Content-Disposition headers
approach with WindowsCE? And using header("Locatio n: ...") how do I
stop the client WindowsCE browser from displaying garbage binary data
and prompt him to save the file instead?
Sorry if this thread belongs in a more specific WindowsCE newsgroup. I
just thought that, since I'm using PHP, that any PHP user here could
have developed for the WindowsCE before and stumbled on the same
problem...
Thanks!
Best regards! 2 2133
"Pedro Fonseca" <no****@pedrofo nseca.com> wrote in message
news:15******** *************** ***@posting.goo gle.com... Greetings!
In my PHP website I'm trying to raise a File Download dialog directly in a WindowsCE IE client with the following code:
header( "Content-Type: application/octet-stream\n" ); header( "Content-Disposition: attachment; filename=\"$fil e\"\n" ); header( "Content-Transfer-Encoding: binary\n" ); header( "Content-Length: " . filesize($path. $file) . "\n" );
The dialog does appear, but instead of prompting the user to save a something.zip filename (for instance) it prompts him to save a file called script.php (the name of the script that has this code). This is very strange, since I know that this code is the cookbook approach to do this, and it works perfectly in all PC browsers that I know of. It seems that WindowsCE IE completely ignores the filename attribute in the Content-Disposition HTTP header... :-(
I've been suggested to feed the link directly to the client, through header("Locatio n: ..."). I did try that, but instead of a dialog, the client browser just displays the binary file in the HTML page...
Is there a PHP workaround to using the Content-Disposition headers approach with WindowsCE? And using header("Locatio n: ...") how do I stop the client WindowsCE browser from displaying garbage binary data and prompt him to save the file instead?
Sorry if this thread belongs in a more specific WindowsCE newsgroup. I just thought that, since I'm using PHP, that any PHP user here could have developed for the WindowsCE before and stumbled on the same problem...
Thanks! Best regards!
Pedro,
My understanding is that this is broken in some browsers. I've seen
different results in every different version of IE that I've ever had a look
at.
You may find that selecting 'open' when the script.php download box appears
will open another dialog box with the correct filename.
My only suggestion is to update the client software to the latest version.
It's not something you can control via your PHP script, as far as I am aware
Nathan
"Nathan Gardiner" <na**@nate.id.a u> wrote in message news:<40******* *************@n ews.astraweb.co m>... "Pedro Fonseca" <no****@pedrofo nseca.com> wrote in message news:15******** *************** ***@posting.goo gle.com... Greetings!
In my PHP website I'm trying to raise a File Download dialog directly in a WindowsCE IE client with the following code:
header( "Content-Type: application/octet-stream\n" ); header( "Content-Disposition: attachment; filename=\"$fil e\"\n" ); header( "Content-Transfer-Encoding: binary\n" ); header( "Content-Length: " . filesize($path. $file) . "\n" );
The dialog does appear, but instead of prompting the user to save a something.zip filename (for instance) it prompts him to save a file called script.php (the name of the script that has this code). This is very strange, since I know that this code is the cookbook approach to do this, and it works perfectly in all PC browsers that I know of. It seems that WindowsCE IE completely ignores the filename attribute in the Content-Disposition HTTP header... :-(
I've been suggested to feed the link directly to the client, through header("Locatio n: ..."). I did try that, but instead of a dialog, the client browser just displays the binary file in the HTML page...
Is there a PHP workaround to using the Content-Disposition headers approach with WindowsCE? And using header("Locatio n: ...") how do I stop the client WindowsCE browser from displaying garbage binary data and prompt him to save the file instead?
Sorry if this thread belongs in a more specific WindowsCE newsgroup. I just thought that, since I'm using PHP, that any PHP user here could have developed for the WindowsCE before and stumbled on the same problem...
Thanks! Best regards!
Pedro,
My understanding is that this is broken in some browsers. I've seen different results in every different version of IE that I've ever had a look at. You may find that selecting 'open' when the script.php download box appears will open another dialog box with the correct filename.
My only suggestion is to update the client software to the latest version. It's not something you can control via your PHP script, as far as I am aware
Nathan
Thanks Nathan, I appreciate your answering. I didn't have many hopes
of getting the thing done without updating/changing the browser
client, and you confirmed it. Thanks!
Best regards!
Pedro Fonseca (ADETTI/ISCTE) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tony Marston |
last post by:
If the use of the browser's BACK button is interfering with the operation of
your web application then take a look at this article entitle "Back Button
Blues"
http://www.tonymarston.co.uk/php-mysql/backbuttonblues.html
--
Tony Marston
http://www.tonymarston.net
|
by: Philipp Brune |
last post by:
Hi all,
the following problem occured to me and I hope somebody can
help me :
I need to implement an encrypted File download with
a PHP script on the server side and a c# client application.
I know there is a way to symmetrically encrypt files
with the php mcrypt routines and already did implement a
|
by: atse |
last post by:
Hi,
I want the MP3 audio files to be able to download by users only. Even I set
the pages validated by session, anyone still can type the download url to
get my files without access of the pages where download URL provided. How
can I do in order to prevent everyone from downloading without a user
account?
Thanks for any idea?
Atse
|
by: Dan Cimpoiesu |
last post by:
I have a remoting object, derived from MarshalByRefComponent, that I
instantiate on the client side, with Activator.GetObject.
Can I receive events fired on the server, on the client?
How?
|
by: Skwish |
last post by:
Hi,
I would like to download all the files from a folder (of various types i.e.
..txt, .dll, .dat, etc.). I tried
Dim MyDir As IO.Directory
Dim path As String = Me.MapPath(".") & "\Data"
Dim dirs As String() = IO.Directory.GetFiles(path)
Dim iLoop As Integer
Dim FileName As String
'Set the appropriate ContentType.
| |
by: Sleepy |
last post by:
I am wanting to allow a client to download a file from a web server and save it on their local PC. The only way that I have found to do this is to use HTTP headers. I am using the code shown below (which I have copied with some variable name changes) from a book on ASP.NET programming. This code sits in the Page_Load event of a file called 'Download.aspx'. In order to send a file to the client, this page is called from another page (using...
|
by: Tim Westmoreland |
last post by:
Can someone tell me how to raise an event or trap when the maxlength of a
server side textbox has been reached?
|
by: Roy |
last post by:
Hi,
I have a problem that I have been working with for a while.
I need to be able from server side (asp.net) to detect that the file i'm
streaming down to the client is saved completely/succsessfully on the
client's computer before updating some metadata on the server (file
downloaded date for instance)
However,
All examples i have tried, and all examples I have found that other people
says works - doesn't work for me :-(
|
by: pradqdo |
last post by:
Hi folks,
I have a very strange problem when I try to port my client/server
program to cygwin. It is a simple shell program where the server
executes client's commands + it can send and receive files (something
like ftp server/client).
I implemented all the commands which the server executes from scratch
meaning I don't use fork and exec. It was very educational but my
problem is that when I try to "get <filename>" from server to the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |