View Single Post
Old 04-05-2006, 05:47 PM   · #7
cvxdes
DNOA Member
 
cvxdes's Avatar
 
Location: Milford MA
Trader Rating: (104)
Join Date: Oct 2005
Posts: 682
NP$: 94.45 (Donate)
cvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud ofcvxdes has much to be proud of
I prefer flatDB for this.

In your DB file, put:
Code:
http://www.hi.com||http://www.hi.com/hi.png http://www.hi2.com||http://www.hi2.com/hi.png


The php:
PHP Code:
<?
funtion ad_template
($url, $img){
    
$ad = "<a href='".$url."'><img src='".$img."' alt=''/>";
    return
$ad;
}
$i = 0;
$lines = file('addb.txt');
foreach(
$lines as $line){
    
$i++;
    
$data = explode("||", $line);
    
$return[$i] = ad_template($data[0], $data[1]);
}
$number = rand(0,$i);
echo
$return[$number];
?>


Please register or log-in into NamePros to hide ads
cvxdes is offline   Reply With Quote
Site Sponsors
Get Your Site Linked at LinkedKeywords.com NameChatter Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 08:41 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.