in reply to Way to insert some ad code
Do exactly what you are saying, but in code.
my $count = 0; #temporary variable to count with $SQL = "SELECT * FROM $database_table order by date DESC, ID DESC limi +t 10"; $sth = $dbh->prepare($SQL); $sth->execute; open(TXTFILE, ">$rootpath$categoryDir$frontPage"); while ($pointer = $sth->fetchrow_hashref) { $fullpath = $pointer->{'fullfilepath'}; $name = $pointer->{'filename'}; $thumbnail = $pointer->{'thumbnail'}; $image = $pointer->{'image'}; $imagewidth = $pointer->{'imagewidth'}; $headlinelink = $pointer->{'headlinelink'}; $count++; # umm...err...count if ($count > 2) { # if we counted to 3 then do something print TXTFILE "YOU AD HERE"; # and now we start counting agian. $count = 0; } print TXTFILE <<TEXT; <a href=$url NOUNDERLINE id="headline"><font size="+1" face=arial>$tit +le</font></a><br> <font size="1">$category - $month $day, $year $catsiteshow</font><br> TEXT }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Way to insert some ad code
by Fletch (Bishop) on Jan 25, 2007 at 20:25 UTC | |
by eric256 (Parson) on Jan 25, 2007 at 20:28 UTC | |
|
Re^2: Way to insert some ad code
by htmanning (Friar) on Jan 25, 2007 at 21:22 UTC |