User Allow To Download In 3 Seconds [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// if name via get equals 'download", show the downloading message. [/FONT][/COLOR][COLOR=#007700][FONT=monospace]if([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_GET[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'name'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]] == [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"download"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]){ echo [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"Downloading ... "[/FONT][/COLOR][COLOR=#007700][FONT=monospace]; } else { [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// set refresh to 3 seconds, make the variable name be 'download' via the get method; [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]header[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"Refresh: 3: url=http://domain.com/index.php?name=download"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]); [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// show this message [/FONT][/COLOR][COLOR=#007700][FONT=monospace]echo [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"You can download in 3 seconds."[/FONT][/COLOR][COLOR=#007700][FONT=monospace]; } [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR] Code (markup):
Try semi-colon instead of colon after the 3. i.e. header("refresh:3;url=http://domain.com/index.php?name=download"); PHP: