note 16125 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:13:29 +0000 |
| Subject: | note 16125 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19822@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>";