I have tied up with a person wherein my site is hosting the files and he will be linking the downloads from his site. In return he's told me that this is what i can do- Make a page saying things about my site and then redirect it so thats after 3 seconds or so, it starts downloading I obviously can make the page but how exactly do i go about doing the redirection thing properly? Thanks
Here Replace the URL with the URL of your chouce <?php header("Refresh: 3; url=http://www.php.net"); ?> Code (markup): The file that this is in needs to have the extension .php Source
Or if you don't have the option of using php then : <meta http-equiv="refresh" content="2;url=http://php.net"> In standard html will do the same thing, needs (won't validate if it's not) to be in the <head> section of the page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php header("Refresh: 5; url=http://xxx.net/AFTERTASTE%20-%20OPERATION%20WATER.wmv"); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #000000; and this is the error i get Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/hosted/index.php:3) in /home/xxx/public_html/hosted/index.php on line 4
always a pleasure ... FYI : In php, it's good pratice, to put header() above any html output to the browser, as headers can't be sent to redirect if the static html headers have been output, the way to get around it would be using ob_start() at the beginning, but normally it's unecessary and bad practice.
Is there a way to do this with some smarty and a <meta> statement? Like: {if url = /weather.php} <meta http-equiv="refresh" content="30;url=/weather.php"> {/if} Code (markup): The thing is, I have a dynamic site, so only one header file... so I don't want all of the pages to refresh, just the one. The above is just a rough example as I'm not that great with smarty. Thanks in advance to anyone that can help.