PHP Code:
$urls = mysql_query("SELECT linkid,linkurl FROM adv_links ORDER by linkid ASC WHERE dateline > " . (TIMENOW - (2 * 24 * 60 * 60)));
while ($urlrow = mysql_fetch_array($urls)) {
fwrite($file," ");
fwrite($file, $urlrow[1]);
fwrite($file, " | ");
fwrite($file," ");
fwrite($file, $urlrow[0]);
fwrite($file," \n");
}
fclose($file);
?>
Should work, providing that you have a valid MySQL database connection. (maybe post the entire script).