Re: auto download

From: Date: Thu, 23 Feb 2006 15:13:56 +0000
Subject: Re: auto download
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-230963@lists.php.net to get a copy of this message
If your page is already displayed and you want to auto start a link, its not done via PHP, its done via javascript to open a new window towards one of those links. Nothing prevents you from outputting javascript yourself from PHP, give it a try its really fun to build dynamic javascript applications. Jens Kleikamp wrote:
Benjamin Adams wrote:
I have three links. The code already auto selects one. I'm trying to take that one link and automaticly start the download. I tryed with header('location:$link'); but it tells me "Warning: Cannot modify header information" what would I use to start downloading? one of the link is another page so I need it to pop up in a new window. Thanks for any help
Moin, You can´t start the browsers download dialog if you already sent any data. No header(), echo(), print() etc. Have a look at http://pear.php.net/package/HTTP_Download. cheers, Jens


« previous php.general (#230963) next »