Page 1 of 1

Browser Window Closes

Posted: Mon May 20, 2002 2:38 am
by milenia
Hi,

I have made a download counter for my website, on some browers when the file is selected to download, it pops up the file download box and the window itself disappears. Any suggestions, is it a ie setting? or php code?

The Code:

<?
#!/usr/bin/perl
$extension = ".rtx";
$counterdir = "counters/";

$textfont = "Verdana"; //text font for the error msg

if (file_exists("$get$extension"))
{
header("location: $get$extension");
$file = fopen("$counterdir/$get$extension.txt","r+");
$count = fread($file, filesize("$counterdir/$get$extension.txt"));
fclose($file);
$count += 1;
$file = fopen("$counterdir/$get$extension.txt","w+");
fputs($file, $count);
fclose($file);
}
else echo "<font face=$textfont size=2>";
echo "<center><br><br>That file [<b>$get$extension</b>] is not available for download.<br>";
echo "Please contact the server administrator: <a href='mailto:webmaster@milenia.34sp.com'>Webmaster</a>.";

?>

Posted: Mon May 20, 2002 11:08 am
by cwcollins
I'm pretty sure this is an issue with the browser. i have our camus search engine setup to generate vcards in a similar manner, but different browsers behave differently [there is an obvious statement]...

-c.w.collins