Forum Moderators: coopster

Message Too Old, No Replies

Meta Refresh code?

         

ajs83

8:30 pm on May 31, 2004 (gmt 0)

10+ Year Member



I currently use the following redirection script using the Header Location method, and was told it was better to go with the Meta Refresh code for best performance. I know using the MR way isn't much more code, but since I am still new to the php game I do not know how to change it to the MetaRefresh way. Any help would be appreciated!

<?php

$f = fopen("dr.txt","r");

for( $i=1 ; $i<=$id ; $i++ )
{
$destination = fgets($f);
}

header("Location: " . $destination);

exit();

?>

===============================
FYI- dr.txt is a list of the redirection links.

WhosAWhata

2:00 am on Jun 1, 2004 (gmt 0)

10+ Year Member



echo '<META HTTP-EQUIV="REFRESH" CONTENT="0; URL='.$destination.'">';