Page 1 of 1

Redirect prob

Posted: Thu Jul 15, 2004 12:42 pm
by phpcoder
I have a page that redirct user to downlod file but download dsnt start automatically .
header("Redirect: $_GET['file']);
I have given link i.e if download dsnt start auto...... click here .. but i want file download to start automatically .Plz tell me how 2 solve this prob .
thanks

Posted: Thu Jul 15, 2004 12:54 pm
by Deemo
header("Location: $_GET['file']") not Redirect

Posted: Thu Jul 15, 2004 1:49 pm
by feyd
Correction on Deemo's: header("Location: {$_GET['file']}") ... however, I'd suggest using [php_man]readfile[/php_man]() the download script.. (so people have a harder time getting the actual location of the file. Which helps your counter stay accurate by preventing hot-linking)

Posted: Thu Jul 15, 2004 4:52 pm
by Deemo
thanks for the correction feyd ;)