.htaccess troubles any advice
Great to meet you all however i have been trying to get a text ad rotator.php to rotate im using the include tag and its viewable just not rotating i have coded the php page to read a txt file but having difficulties. i have also found that it might be the .htaccess file and have tried varias 'AddType application/x-httpd-php5 .htm .html' would anyone know what is the correct syntax is please it`ll be much appreciated
code im using in the php file
<?php
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return ((float) $usec * 12345);
}
srand(make_seed());
$seed = rand(1000000,9999999);
srand((double)microtime()*$seed);
$file_name = 'textads.txt';
$break_txt = "--BREAK--";
$max_items = 1;
$style = "<style> P.txt { color: black; font-family: verdana; font-weight: normal; font-size: 10pt; } a:link.txt { color: blue; font-family: verdana; font-weight: bold; font-size: 12pt; } a:visited.txt { color: blue; font-family: verdana; font-weight: bold; font-size: 12pt; } </style>";
$cont = "";
$f = fopen($file_name, "r");
while (!feof($f))
{
$cont .= fread($f, 4096);
}
fclose($f);
$fitems = split($break_txt, $cont);
$items = array();
for ($j=0;$j<count($fitems);$j++)
{
;
if (strstr($fitems[$j], "href"))
$items[] = $fitems[$j];
}
$rit = array_rand($items, count($items));
print $style;
for ($i=0;$i<$max_items && $i < count($rit);$i++)
{
print str_replace("href", " class=\"txt\" href", $items[$rit[$i]]);
}
?>
Regards Jonathan
Read one of my latest blog posts:
https://www.eagleblogging.com/write-...ost-today.html