note 16125 added to function.header
| From: | gerry dot beauregard at muvee dot com | Date: | Wed, 17 Oct 2001 07:50:13 +0000 |
| Subject: | note 16125 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19029@lists.php.net to get a copy of this message | ||
I needed a way to give stable download links for installers whose version number was changing
frequently. Came up with this download redirector script. Now I can give someone a link like
this:
www.muvee.com/download.php?item=ap
and it will redirect to the latest version of our software as long as I keep the array or URLs
up-to-date.
$urlTable = array(
'ap' => 'http://www.muvee.com/download/muveeautoProducer1.0.1.exe',
'apdx' => 'http://www.muvee.com/download/muveeautoProducer1.0.1DX.exe'
);
if ( isset($urlTable[$item]) )
{
$url = $urlTable[$item];
header( "Location: $url" );
}
else
echo "Download item $item does not exist<br>";
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+16125
http://master.php.net/manage/user-notes.php?action=delete+16125
http://master.php.net/manage/user-notes.php?action=reject+16125