All IE has a bug for download file so.:)
see this http://support.microsoft.com/default.aspx?scid=kb;en-us;308090
some unkown mime type also display in IE no popup a download window
2009/8/26 Ryan Cavicchioni :
> On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote:
>> I tried to downlo
On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote:
> I tried to download the file from another server the fancy way in PHP, but
> it just display blank screen. Can You please look at my code:
If it helps, here is some code that I dug up from an old project:
I would also verify th
Grega Leskovšek wrote:
> I tried to download the file from another server the fancy way in PHP, but
> it just display blank screen. Can You please look at my code:
>
> $filepath = "http://aa.yolasite.com/resources/happytears.doc";;
> // $filepath = "http://users.skavt.net/~gleskovs/else/h
On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote:
> I tried to download the file from another server the fancy way in PHP, but
> it just display blank screen. Can You please look at my code:
>
> $filepath = "http://aa.yolasite.com/resources/happytears.doc";;
Try using a lo
For starters, three calls to header("Content-type: "); is just plain silly :-)
Read this for sure:
http://php.net/header
You may find this interesting, or not, to pick the right Content-type
http://richardlynch.blogspot.com/2006/06/php-downloads-content-disposition.html
--
PHP Genera
December 2008 20:23
To: Mayer, Jonathan
Cc: Wolf; php-general@lists.php.net
Subject: RE: [PHP] Downloading file from local network machine
On Fri, 2008-12-05 at 17:32 +, Mayer, Jonathan wrote:
> Thanks Wolf :)
>
> Yup, I had considered that, although there could be up to 8 differen
gt; >
> > > -Original Message-
> > > From: Wolf [mailto:[EMAIL PROTECTED]
> > > Sent: 05 December 2008 17:29
> > > To: Mayer, Jonathan; php-general@lists.php.net
> > > Subject: Re: [PHP] Downloading file from local network machine
> > >
Hello Jonathan,
On Fri, 2008-12-05 at 17:32 +, Mayer, Jonathan wrote:
> Thanks Wolf :)
>
> Yup, I had considered that, although there could be up to 8 different servers
> so that's 8 seperately mapped drives.
>
> If that's the simplest/neatest way, I'll do that, although I did wonder
> wh
cember 2008 17:29
> > To: Mayer, Jonathan; php-general@lists.php.net
> > Subject: Re: [PHP] Downloading file from local network machine
> >
> >
> > > I would like to present users to our internal intranet with a link to
> > > download a file from a folder o
I did wonder
> whether there was some other clever another way around it.
>
> -Original Message-
> From: Wolf [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2008 17:29
> To: Mayer, Jonathan; php-general@lists.php.net
> Subject: Re: [PHP] Downloading file from local net
riginal Message-
From: Wolf [mailto:[EMAIL PROTECTED]
Sent: 05 December 2008 17:29
To: Mayer, Jonathan; php-general@lists.php.net
Subject: Re: [PHP] Downloading file from local network machine
> I would like to present users to our internal intranet with a link to
> download a file from a
> I would like to present users to our internal intranet with a link to
> download a file from a folder on a different machine on our local
> network (such as \\computername\folder\file)
Map the drive to the server so that it is accessible as /folder/file on the
website.
Voila, no more prob
("none")
before session_start resolved the problem
(http://bytes.com/forum/thread554529.html)
Robbert
From: Tom Chubb [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2008 1:41 AM
To: Robbert van Andel
Cc: php-general@lists.php.net
Subject: Re: [PHP] Downloading a file
On 16/0
On 16/07/2008, Robbert van Andel <[EMAIL PROTECTED]> wrote:
>
> I am having trouble getting a file to download to work in Internet
> Explorer.
> The site works fine in FireFox. The page retrieves the contents of a file
> from a database and outputs the following
>
>
>
>
>
>
> header("Content-typ
On Fri, August 3, 2007 10:47 am, WyleySam wrote:
> Exactly where does one go to download PHP 521, not 523, not 522 but
> 521???
> Every link I clicked on at http://www.php.net/ took me to 523, which I
> don't
> want.
Did you try the links on this page:
http://www.php.net/releases/
--
Some peopl
WyleySam wrote:
Exactly where does one go to download PHP 521, not 523, not 522 but 521???
Every link I clicked on at http://www.php.net/ took me to 523, which I don't
want.
http://us3.php.net/get/php-5.2.1.tar.gz/from/this/mirror
--
Jim Lucas
"Some men are born to greatness, some achiev
WyleySam wrote:
Exactly where does one go to download PHP 521, not 523, not 522 but 521???
Every link I clicked on at http://www.php.net/ took me to 523, which I don't
want.
http://museum.php.net/php5/
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
http://www.php.net/releases/
-- N/A
-Original Message-
From: WyleySam [mailto:[EMAIL PROTECTED]
Sent: Friday, August 03, 2007 10:47 AM
To: php-general@lists.php.net
Subject: [PHP] Downloading PHP 521
Exactly where does one go to download PHP 521, not 523, not 522 but 521???
Every lin
On Wed, April 11, 2007 8:10 am, Ross wrote:
> tthe image does not display although it exists in the table 'images'
>
>
> This calls the download script
>
>
> $property_id = $_SESSION['property_id'] ;
> $query = "SELECT * FROM images WHERE property_id='$property_id'";
> $result = mysql_query($que
Ross wrote:
> tthe image does not display although it exists in the table 'images'
>
>
> This calls the download script
>
>
> $property_id = $_SESSION['property_id'] ;
> $query = "SELECT * FROM images WHERE property_id='$property_id'";
> $result = mysql_query($query);
> while($row = mysql_fe
[snip]
tthe image does not display although it exists in the table 'images'
[/snip]
http://www.google.com/search?hl=en&q=display+image+from+blob+PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
El Thu, 11 Jan 2007 14:59:36 -0500
"Sugrue, Sean" <[EMAIL PROTECTED]> escribió:
> I need download a binary file in php. I don't need to read the
> contents just download the whole file to a browsed directory.
> I know you can use the header function, does anyone know the syntax.
>
> Sean
>
May
estion for the tenth time this month.
That's all I'm saying.
-Stut
-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 3:03 PM
To: Sugrue, Sean
Cc: php-general@lists.php.net
Subject: Re: [PHP] Downloading a binary file
Sugrue, Sean w
Sugrue, Sean wrote:
I need download a binary file in php. I don't need to read the contents
just download the whole file to a browsed directory.
I know you can use the header function, does anyone know the syntax.
Please, for the love of $DEITY, check the archives before posting. This
particul
Hi
Try this:
There shouldn't be a character encoding problem with this two lines.
Don't forget the mime type:
http://earth.google.com/support/bin/answer.py?answer=25094&topic=1139
bernhard
Am Dienstag, den 26.12.2006, 17:22 +0500 schrieb Fahad Pervaiz:
> I want to download UTF-8 encoded kml f
For LARGE datasets, CSV or tab-delimited transfers are probably going
to be easiest to suck in to the DB.
Another option is to just use pg_dump, if you want whole tables.
Otherwise, honestly, I'd suggest you just export your data to RSS or
XML and let the user choose how to open it up.
Even CSV
BBC a écrit :
Hi all...
I'm interesting in a page (using PHP script) in internet,
and I'd like to download that page with the complete script.
the question is:
Can I..?
Hi,
you can't directly.
you have to ask the webmaster of the site.
but the source code won't be helpfull if the script req
BBC wrote:
Hi all...
I'm interesting in a page (using PHP script) in internet,
and I'd like to download that page with the complete script.
the question is:
Can I..?
and How..?
thank for your input...
No you can't. And I thank $DEITY for that. If you really want the source
code contact th
On Mon, Feb 13, 2006 at 03:27:32PM -0700, Jonathan Duncan wrote:
> I have an application that delivers files to the client browser. These
> files a very large video files. 250mb+ each. I have two options: 1) I
> could have PHP deliver the file with "fread", or 2) I could have PHP
> present a
Jonathan,
Not sure how you're using fread, but here's a slightly modified version of
what's in the manual that might help:
If my understanding of this code is correct you won't be trying to load the
entire file into memory and you're not trying to store the file in a
variable. All that this sho
Thank you for the input. For now we are just using PHP to create symbolic
links to the video files and the links are removed when they are done
viewing the video. We are open to other suggest still, but for now, this
fills our needs and bypasses putting so much stress on PHP as to put
hundred
I've seen this problem many times before, but I'm not sure what solution was
found.
Possible solutions:
Encrypt the file, make it publicly available, and then give the right people
the encryption key.
Put it behind a .htaccess file allowing only the IP of the correct person -
remove the .htacces
On 5/5/05, Cima <[EMAIL PROTECTED]> wrote:
> i've uploaded some files into my postgresql db, via a php script, and now
> id like to give a user the posibility to download these files via a php
> script. what would be the best way to do this bearing in mind that the files
> are 'integrated' into th
Michael Grunewalder wrote:
> I have a list of files that are outside the web root and can't be accessed
> with a
> URL directly.
> If a user clicks the link for a file on the download page, I would like to
> send
> that file to the browser as a download *and* display HTML in the browser
> window.
>
John Camp wrote:
I was able to successfully make a very simple http proxy - turns out the
php documentation has the code for this =] - but now I need a way to
display images. I figured the best way would be to download the images
to a temporary folder, then parse the html to point to the images
On Wed, 12 Jan 2005 22:14:35 -0600, John Camp <[EMAIL PROTECTED]> wrote:
> I was able to successfully make a very simple http proxy - turns out the
> php documentation has the code for this =] - but now I need a way to
> display images. I figured the best way would be to download the images
> to a
* Thus wrote Robin Getz:
> Curt Zirzow [EMAIL PROTECTED] wrote:
> >> replaced:
> >> readfile($name);
> >> with:
> >> $fp = fopen($name, 'rb');
> >> fpassthru($fp);
> >
> >The only difference between readfile() and fpassthru() is what parameters
> >you pass it.
> >
> >Something else is the pr
OK, I checked things out, and based on some private emails, and pointers,
from Francisco M. Marzoa [EMAIL PROTECTED], I have now
replaced:
readfile($name);
with:
while(!feof($fp)) {
$buf = fread($fp, 4096);
echo $buf;
$bytesSent+=strlen($buf);/* We know how many
Robin Getz wrote:
The same problem exists with fpassthru (now that I have let it run a
little longer) I now have 5 sleeping httpd processes on my system that
are consuming 200Meg each.
Any thoughts?
Ok, so much for the theory. What about the output buffering? Have you
checked if you have output
Curt Zirzow [EMAIL PROTECTED] wrote:
> replaced:
> readfile($name);
> with:
> $fp = fopen($name, 'rb');
> fpassthru($fp);
The only difference between readfile() and fpassthru() is what parameters
you pass it.
Something else is the problem, what version of php are you running?
I am using php
* Thus wrote Robin Getz:
> Klaus Reimer [EMAIL PROTECTED] wrote:
> >If this theory is true, you may try fpassthru().
>
> replaced:
> readfile($name);
> with:
> $fp = fopen($name, 'rb');
> fpassthru($fp);
The only difference between readfile() and fpassthru() is what
parameters you pass it.
On Thu, 04 Nov 2004 08:22:18 -0800, Robin Getz
<[EMAIL PROTECTED]> wrote:
> and now I don't loose 250 Meg of memory every time I download a 250Meg
> file. If someone wants to add this to the readfile() php manual - great.
Anyone can post user comments in the manual. Give it a shot.
--
Greg Do
Klaus Reimer [EMAIL PROTECTED] wrote:
If this theory is true, you may try fpassthru().
replaced:
readfile($name);
with:
$fp = fopen($name, 'rb');
fpassthru($fp);
and now I don't loose 250 Meg of memory every time I download a 250Meg
file. If someone wants to add this to the readfile() php m
Robin Getz wrote:
The issue is that readfile writes it to the output buffer before sending
it to the client.
Are you sure you HAVE output buffering? What does ob_get_level() return?
If it returns 0 then you don't have output buffering.
My theory (and it's only a theory) is, that readfile may no
Hi Rasnita,
What you excatly want to do?
if you just want to get a remote file.
You can use normal file functions like fopen, fget,
fgets, file_get_contents etc. with a url.
http://in.php.net/manual/en/ref.filesystem.php
and if you want to send headers to a server using
curl can be a solut
I did exactly what you said but its not working for me. I am getting the
following error:
Warning: filesize(): SAFE MODE Restriction in effect. The script whose uid
is 20373 is not allowed to access /var/www owned by uid 0 in
/home/virtual/site341/fst/var/www/html/test.php on line 3
I checked
Aaron Todd wrote:
I have been using the following code to try to make it work:
The webroot of my site is at: /var/www/html
So far this will create a new file on my computer where ever I want, but it
does not download the contents of the file.
Any suggestions?
Thanks,
Aaron
It seems that PHP can
I have been using the following code to try to make it work:
The webroot of my site is at: /var/www/html
So far this will create a new file on my computer where ever I want, but it
does not download the contents of the file.
Any suggestions?
Thanks,
Aaron
"Octavian Rasnita" <[EMAIL PROTECT
You can put the files that need to be downloaded in a directory somewhere
outside of the web server root, but in that case your PHP program will need
to read the file and print it to the browser, and it will also need printing
the HTTP headers:
Content-type: application/octet-stream
Content-dispos
Aaron Todd wrote:
I posted a simular question before and never really got an answer. The post
drifted off into some other valuable information, but I still have the same
question.
I am trying to create a site with file downloads. The files on the server
that are to be downloaded need to be protec
Hi Aaron,
[..]
The download files are in a directory protected by htaccess which it
is my understanding that PHP can go underneath htaccess to get access
to the files. My problem is where do I put this directory? I was
already told to put it outside the web root directory,
[..]
Both are goo
Urldecode(..) may not be binary safe. I'm not sure exactly what type of
content it is you are storing in the database for 'fdata', but it sounds
like you're misusing urlencode/urldecode. In short,
urlencode(..)/urldecode(..) are for encoding URLs and are not the
appropriate way to escape binary dat
On Monday 10 November 2003 08:07 pm, Stephen Craton
wrote:
> I have a database which keeps some normal files in
> LONGBLOBS. I then call up a file called download.php
> to retrieve the file from the database, echo out
> it’s contents, and it’s type, and all that so they
> download it.
> However,
ECTED]
Sent: Monday, November 10, 2003 8:31 PM
To: Stephen Craton
Subject: Re: [PHP] Downloading MySQL Files
On Monday 10 November 2003 08:07 pm, Stephen Craton
wrote:
> I have a database which keeps some normal files in
> LONGBLOBS. I then call up a file called download.php
> to retrieve the
You could use an iframe or you could turn on output buffering, when
output buffering is enabled you can send headers after normal output has
been sent. Just do ob_start(); at the top of your script. Not the most
elegant way of doing it but it would work and not require you to use an
iframe.
* Thus wrote Amanda McComb ([EMAIL PROTECTED]):
> I have a page that queries the database then uses the data to build an
> excel spreasheet. THat spreadsheet is downloaded according to info in the
> headers. My manager wants to put the page inside of another HTML page to
> make it prettier, but t
> I have a page that queries the database then uses the data to build an
> excel spreasheet. THat spreadsheet is downloaded according to info in the
> headers. My manager wants to put the page inside of another HTML page to
> make it prettier, but then it breaks because headers are already writte
"Jeff Harris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jun 11, 2003, "Alex Earl" claimed that:
>
> |> Does anyone know what to do to make it saved as: mysoft-1.0-truc.zip
> |>
> |> And I would like to display a page telling "Thanks for download" or
> |> something...but if I
On Jun 11, 2003, "Alex Earl" claimed that:
|>
|> If he wants to download, in the file downloadit.php, there is:
|> header("Content-type: application/octet-stream\n");
|> header("Content-Disposition: attachment; filename=mysoft-1.0-truc.zip");
|> header('Cache-Control: public');
|> header("Content-
>
> If he wants to download, in the file downloadit.php, there is:
> header("Content-type: application/octet-stream\n");
> header("Content-Disposition: attachment; filename=mysoft-1.0-truc.zip");
> header('Cache-Control: public');
> header("Content-transfer-encoding: binary\n");
> header("Content-l
Try a different mirror.
On Sat, 7 Jun 2003 [EMAIL PROTECTED] wrote:
> Hello All,
> I have a problem with downloading new PHP 4.3.2. Whenever
> I try to download it from whichever mirror I got a HTTP 404 error.
> Could someone tell why?
>
> Thanks Milan
>
>
> --
> PHP G
header('Content-type: application/octet-stream');
Sichta Daniel wrote:
Hi,
cfg: php 4.2.3, IIS5.1
I have generated link (from MySQL database) on my web sile, which suppose to
allow user to dowload xml file. How can I do this because when I'm just
adding name of the file to the href then it will
The problem was solved. I added a call to the exit() construct at the end of
the function and haven't had any more problems since.
I would like to thank everyone who helped me.
Cheers,
Daniel
"Daniel Silva" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello.
>
> I tried what y
Hello.
I tried what you suggested and it's working alright. The problem is, that it
doesn't always work. I adapted your suggestion to what I needed. Instead of
creating a file, I made a fuction that does basically the same. All listed
files are links that enable the user to download them.
So far
There's actually a function in (PHP 4 >= 4.3.0) that returns a file's MIME
type.
Here it is:
string mime_content_type ( string filename)
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Yes, sure, but you many times won't know the mime type and might be
> forced to
Yes, sure, but you many times won't know the mime type and might be
forced to use application/octet-stream.
You can do
if(dirname(realpath($user_files_dir . $_GET['filename'])) ==
$user_files_dir)
as a security check
Daniel Silva wrote:
That is a very nice solution, the problem is, the files ar
That is a very nice solution, the problem is, the files are stored on disk,
not on the DB. I suppose it can be addapted to work with the disk, can't it?
Cheers,
Daniel
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> create a download php file:
>
>
> $res=mysql_q
create a download php file:
$res=mysql_query("select * from user_files where filename='$GET['file']'");
if($res && mysql_num_rows($res)) {
$file=mysql_fetch_assoc($res);
if($_GET['downaload']) {
header('Content-Type: application/octet-stream');
header('Content-disposition: a
At 00:52 24.02.2003, Anthony Rodriguez said:
[snip]
>In PHP, is there a way to allow the user to download a demo file (e.g.:
>sample.exe) to their computer? And, then, automatically return to the Web
>site?
[snip]
A
on 24/02/03 1:01 AM, Anthony Rodriguez ([EMAIL PROTECTED]) wrote:
> In PHP, is there a way to allow the user to download a file (e.g.:
> sample.txt) to their computer? And, then, automatically return to the
> PHP-generated Web page.
why do you need to re-run the page? it can be done with a bit o
t; <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 08, 2003 1:51 PM
Subject: Re: [PHP] Downloading File rather then Executing
> On Sunday 09 February 2003 02:46, Stephen Craton wrote:
>
> > Got a problem. For some reason, when I try to view a PHP
On Sunday 09 February 2003 02:46, Stephen Craton wrote:
> Got a problem. For some reason, when I try to view a PHP file on my server,
> it wants to download the file rather then open and execute. I have no
> control over my server so what should I do?
>
> Here's a sample URL:
>
> http://d2mods.xfe
> I want to protect files from being downloaded and only allow people to
> download files which they have access too. I've done all the access
> control
> etc... but whats the best way for the user to download the file... Can
you
> "paste" the file directly into the header? (get the file from the
got it!! :)
$filename = "backup.tar";
$download_file = "/absolute/path/backup.tar";
$fh = fopen("$download_file", "r");
header("Content-Type: application/x-tar");
header("Content-Disposition: attachment; filename=$filename");
fpassthru($fh);
exit();
Thanks a lot!! :)
"Justin French" <[EMAIL PRO
Either of these options will work fine. There was MASSIVE disscussions
about this a few weeks back -- check for threads started by myself in the
archives.
Justin French
on 26/06/02 12:35 AM, Francis ([EMAIL PROTECTED]) wrote:
> I want to protect files from being downloaded and only allow pe
On Wednesday 10 April 2002 08:54, Jim Koutoumis wrote:
> Using this method,.. works OK if you choose to save the file, however if
> you choose to open the file you get a weird behaviour where IE says it
> can't find the file and a subsequent prompt to create a new one. Does
> anyone know why it do
Using this method,.. works OK if you choose to save the file, however if you
choose to open the file you get a weird behaviour where IE says it can't
find the file and a subsequent prompt to create a new one. Does anyone know
why it does this and how to overcome it ?
At this stage I've resorted t
Try this:
As you give the client Content-Type: application/save-as - it will not know
what mime type the file is,
and the browser will give the user a save-as prompt.
This works in explorer - I haven't checked it in Mozilla etc - so you might
have to tweak it a bit.
Cheers
Scott
- Origina
On Tuesday 09 April 2002 11:20, Declan Kenny wrote:
> Hi folks,
>
> Ok I am trying to make a download area for files (including word files).
> How do I force a download of a word document rather than have it opening in
> IE?
>
> Declan
You don't. This option is set in windows exploror. as part o
Hi,
Thanks for your help, but that assumes that file is (at least temporarily)
stored on disc - I'd like to take the file data straight out of the database
and be available for "download" by the user. Is this possible at all, or will
I have to create a temporary file to hold the data, and *then*
In the download_file.php put a header() function which redirects the
browser to the file, like header("Location: test.dat"). After that it
should show the dialog screen.
Balazs
On Mon, 25 Feb 2002, Lee P Reilly wrote:
> Hi,
>
> I wonder if someone can point me in the direction of an example and
With some of the newer broswers, you may be able to re-define the
functionality of the context menu via JavaScript. Visit
http://www.dynamicdrive.com; I think that there are some examples there,
and you might be able to redirect the "save image as..." functionality
there (I wouldn't count on
I suggest you call: readfile() instead of include() at the end of your
script!
"David Otton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote:
>
> >I have added a download button to a web-site that
> >enables us
On Thu, 4 Oct 2001 07:51:59 -0700 (PDT), you wrote:
>different length, (3k as opposed to the original 9k) I
>originally did have an error message appended to the
>downloaded image but that no longer appears to be the
>case. However the image is definitely truncated. Any
All the JPEGs I have here
Hi Dave,
Thanks for you prompt response. The Image is indeed a
different length, (3k as opposed to the original 9k) I
originally did have an error message appended to the
downloaded image but that no longer appears to be the
case. However the image is definitely truncated. Any
ideas why this may
On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote:
>I have added a download button to a web-site that
>enables users to download images to their local
>drives. (I'm using a button as I want to wrap some
>logic round this function) I have the following
>(simplified code )that will be called from
Maybe -- If php was installed with FTP, you can have it FTP stuff
dynamically...
Might be easier to log in to the other server and do FTP by hand for just
one file though...
Don't miss the Zend Web Store's Grand Opening on January 23, 2001!
http://www.zend.com
Wanna help me out? Like Music?
>First of all, am I correct in assuming I could download a file and parse it
using fopen("url")?
Yup. Pretty darn nifty, huh?
>Secondly, if I find an IMG tag, how would I go about grabbing the file that
is contained in the SRC of that image tag?
>Would another simple fopen() and fput() to anoth
88 matches
Mail list logo