Re: [PHP] download file from an ajax request

2008-06-20 Thread Iv Ray
pere roca wrote: hi everybody! Hi! is there some way to allow downloading a PHP generated file from an ajax request? No idea, but would love to hear if/how you solved it. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] download file from an ajax request

2008-06-20 Thread Eric Butera
On Fri, Jun 20, 2008 at 8:02 AM, pere roca [EMAIL PROTECTED] wrote: hi everybody! Hi! is there some way to allow downloading a PHP generated file from an ajax request? the simple code below generates the image but not prompts the save or open file... (it works if I call it directly, not

Re: [PHP] download file from an ajax request

2008-06-20 Thread Iv Ray
Eric Butera wrote: The only thing I can think of is using JS to create some sort of IFRAME, meta redirect, window.location, or a popup window, something that will force the page to hit your download script directly. I've never attempted it myself so I'm not sure what sort of issues IE would

Re: [PHP] download file from an ajax request

2008-06-20 Thread pere roca ristol
yes Iv, surely this is a more js/Ajax issue... this is the one who has to do something with php answer. sorry, Pere 2008/6/20 Iv Ray [EMAIL PROTECTED]: Eric Butera wrote: The only thing I can think of is using JS to create some sort of IFRAME, meta redirect, window.location, or a

Re: [PHP] download file from an ajax request

2008-06-20 Thread Eric Butera
On Fri, Jun 20, 2008 at 8:47 AM, Iv Ray [EMAIL PROTECTED] wrote: Eric Butera wrote: The only thing I can think of is using JS to create some sort of IFRAME, meta redirect, window.location, or a popup window, something that will force the page to hit your download script directly. I've never

Re: [PHP] download file from an ajax request

2008-06-20 Thread Nitsan Bin-Nun
I believe that you don't even have to program it, try to use: iframe src='xxx.php'/iframe And include download headers on the php file - as far as i remember it should popup a save as dialog. Regards, Nitsan On 20/06/2008, pere roca ristol [EMAIL PROTECTED] wrote: yes Iv, surely this is a

Re: [PHP] download file from an ajax request

2008-06-20 Thread Daniel Brown
On Fri, Jun 20, 2008 at 8:02 AM, pere roca [EMAIL PROTECTED] wrote: [snip!] imagepng($image,'definitius_hola.png'); Here you call it 'definitius_hola.png' $h = fopen(definitius.png, r); header(Content-Type: image/png); header(Content-Disposition: attachment;

Re: [PHP] download file from an ajax request

2008-06-20 Thread Daniel Brown
On Fri, Jun 20, 2008 at 12:59 PM, Daniel Brown [EMAIL PROTECTED] wrote: Once you get your download script fixed, try adding these lines to your page: iframe height=0 width=0 name=dl id=dl frameborder=0/iframe a href=img.php target=dlClick to Download/a And just replace img.php with

Re: [PHP] download file from an ajax request

2008-06-20 Thread tedd
At 1:00 PM -0400 6/20/08, Daniel Brown wrote: On Fri, Jun 20, 2008 at 12:59 PM, Daniel Brown [EMAIL PROTECTED] wrote: Once you get your download script fixed, try adding these lines to your page: iframe height=0 width=0 name=dl id=dl frameborder=0/iframe a href=img.php target=dlClick

Re: [PHP] download file from an ajax request

2008-06-20 Thread Daniel Brown
On Fri, Jun 20, 2008 at 2:21 PM, tedd [EMAIL PROTECTED] wrote: Oh, so now you tell us. :-) Hey, back off! You knew I was a horrible person long before this thread! ;-P -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract!

RE: [PHP] download file question...

2004-08-19 Thread Jay Blanchard
[snip] nothing jumps out at me searching google/php.net for this... [/snip] Have you searched the mailing list archives? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] download file question...

2004-08-19 Thread John Holmes
From: bruce [EMAIL PROTECTED] i can allow files to be uploaded to my app. are there corresponding scripts/code to allow files to be downloaded to the user via the browser?? How about a link to the file? If you want to get more complicated, search the archives for readfile and download...

Re: [PHP] Download File

2002-11-19 Thread Adam Voigt
PHP is true and blue in relation to error messages (in this case anyway): Warning: stat failed for http://host.com/document.doc (errno=2 - No such file or directory) in d:\inetpub\wwwroot\dl-doc.php on line 8 The file either doesn't exist on host.com under the root directory as document.doc or

Re: [PHP] Download File

2002-11-19 Thread Ernest E Vogelsinger
At 16:56 19.11.2002, Michelle spoke out and said: [snip] I would like to download a word-document from another site and save it to my harddrive. How would I go about doing this? I tried: ?php $filename = http://host.com/document.doc; $fd = fopen

RE: [PHP] Download File

2002-11-19 Thread Van Andel, Robert
If the word document you are trying to download is already on the server, you could probably just make a link to the file a href=http://host.com/document.doc; When the user clicks on it, they either view the document if they have the MS Word plugin, or they are asked to download it. I'm not

Re: [PHP] Download File Problem - text not appearing on downloaded file

2001-11-20 Thread Gede Gilijk
Joe, I have been there:-) I use this scripts ? function detect_browser($variable) { if(eregi((msie) ([0-9]{1,2}.[0-9]{1,3}), $variable)) { $content = ie; } else { $content = nn; }