Everything is working now only problem is that i need to keep a separate count for every web user that uses these pages. Thanks for the help any idea on this? Do i have to store this count in a file could i store it somewhere else in like a session or something(don't kow if sessions exist in php).. thanks
<?php
/ Determine how many times this page has been viewed per users and bring up ads /
$fp = fopen("count.txt","r");
$count = fread ($fp, filesize ("count.txt"));
fclose($fp);
$count++;
$fp = fopen("count.txt","w");
fwrite($fp, $count);
fclose($fp);
echo "$count";
if ($count=='10')
{
$count = 0;
$fp = fopen("count.txt","r");
$count = fread ($fp, filesize ("count.txt"));
fclose($fp);
$fp = fopen("count.txt","w");
fwrite($fp, $count);
print ("<meta http-equiv='refresh' content='0;URL=break.php>");
}
?>