[advanced search]
Results from the most recent live auction are here.
24 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 01-05-2006, 11:00 AM   · #1
NetworkTown.Net
Senior Member
 
Name: Soon....
Location: United Kingdom
Trader Rating: (27)
Join Date: Oct 2005
Posts: 1,550
NP$: 49.74 (Donate)
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
{Wanted} Random ad's script

I need a random ads script i dont want the script like i have to upload and banner and stuff i want it so i just put in the html (like google codes and clicksor codes ect) and it will show it on my homepage ect.


Please register or log-in into NamePros to hide ads
__________________
PHP2k.com - PHP Coder[B]
NetworkTown.Net is offline   Reply With Quote
Old 01-05-2006, 11:14 AM   · #2
admans
NamePros Regular
 
Trader Rating: (25)
Join Date: Jul 2005
Posts: 916
NP$: 323.05 (Donate)
admans is just really niceadmans is just really niceadmans is just really niceadmans is just really nice
Try this one...

i-fubar.com/rotation-ad-script.php
admans is offline   Reply With Quote
Old 01-05-2006, 11:55 AM   · #3
NetworkTown.Net
Senior Member
 
Name: Soon....
Location: United Kingdom
Trader Rating: (27)
Join Date: Oct 2005
Posts: 1,550
NP$: 49.74 (Donate)
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
thanks but i cant do with tuts how to make it i would rater just download the script
__________________
PHP2k.com - PHP Coder[B]
NetworkTown.Net is offline   Reply With Quote
Old 04-05-2006, 01:48 AM   · #4
Xyzer
Steven
 
Xyzer's Avatar
 
Name: Steven Gibbons
Location: United Kindom
Trader Rating: (45)
Join Date: Aug 2005
Posts: 1,506
NP$: 40.00 (Donate)
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
Tsunami Relief AIDS/HIV
I have made you one:
Code:
<?php srand( microtime() * 1000000); $advertise = rand(1,3); //After the rand decided how many youve got and the first and last number e.g got 3, 1,3 switch($advertise) //you can add more just use the same format { case 1 : $banner="site 1 image url"; $url="site one address"; break; case 2 : $banner="site 2 image url"; $url="site two address"; break; case 3 : $banner="site 3 image url"; $url="site 3 address"; break; } $display = "<a href=\"$url\" target=\"_blank\"> "; $display.= "<img src=\"$banner\" "; $display.= "width=\"468\" height=\"60\" border=\"0\" >"; $display.="</a>"; echo($display); ?>
Xyzer is offline   Reply With Quote
Old 04-05-2006, 01:55 AM   · #5
weblord
www.1weblord.com
 
weblord's Avatar
 
Name: William R. Nabaza - williamrnabaza.com
Location: Philippines - www.Nabaza.com
Trader Rating: (210)
Join Date: Dec 2005
Posts: 16,738
NP$: 18587.23 (Donate)
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
Autism Protect Our Planet
try this:
http://phpadsnew.com/two/
you can just copy and paste any html code for the ad and it will rotate.
weblord is offline  
  Reply With Quote
Old 04-05-2006, 04:28 AM   · #6
lilgee
Senior Member
 
Name: Chris
Location: NC
Trader Rating: (38)
Join Date: Sep 2005
Posts: 2,323
NP$: 49.50 (Donate)
lilgee is a name known to alllilgee is a name known to alllilgee is a name known to alllilgee is a name known to alllilgee is a name known to alllilgee is a name known to all
Originally Posted by webmonkey
I have made you one:
Code:
<?php srand( microtime() * 1000000); $advertise = rand(1,3); //After the rand decided how many youve got and the first and last number e.g got 3, 1,3 switch($advertise) //you can add more just use the same format { case 1 : $banner="site 1 image url"; $url="site one address"; break; case 2 : $banner="site 2 image url"; $url="site two address"; break; case 3 : $banner="site 3 image url"; $url="site 3 address"; break; } $display = "<a href=\"$url\" target=\"_blank\"> "; $display.= "<img src=\"$banner\" "; $display.= "width=\"468\" height=\"60\" border=\"0\" >"; $display.="</a>"; echo($display); ?>




Nice job on it i like it, Simple script.
__________________
Sharing 50% profit for helping to sell on ebay. PM me for more info.
lilgee is offline   Reply With Quote
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];
?>
cvxdes is online now   Reply With Quote
Old 04-06-2006, 03:27 PM   · #8
Borghunter
Resistance is Futile
 
Borghunter's Avatar
 
Name: Mitchell
Location: Calgary, Canada
Trader Rating: (24)
Join Date: Apr 2006
Posts: 1,063
NP$: 156.05 (Donate)
Borghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to all
Wildlife
You can use this code in the area you want the ad:
PHP Code:
<?php
$fcontents
= join ("", file ("banner_ads.txt"));
$s_con = split("~",$fcontents);
$banner_no = rand(0,(count($s_con)-1));
echo
$s_con[$banner_no];
?>


and create a text document named "banner_ads.txt" in the same directory.
In that text document include the following text.

Code:
YOUR FIRST AD CODE ~ YOUR SECOND AD CODE ~ YOUR THIRD AD CODE ~ etc.....
__________________
Politics On Fire - Political Debate and Discussions Forum

Last edited by Borghunter : 04-06-2006 at 03:30 PM.
Borghunter is offline  
  Reply With Quote
Old 04-06-2006, 03:41 PM   · #9
snike
NamePros Regular
 
snike's Avatar
 
Location: USA
Trader Rating: (15)
Join Date: Mar 2006
Posts: 472
NP$: 7.68 (Donate)
snike has a spectacular aura aboutsnike has a spectacular aura about
Save a Life
this is a very nice code. May I use it as well? i like the code above this post.
snike is offline   Reply With Quote
Old 04-06-2006, 05:09 PM   · #10
Borghunter
Resistance is Futile
 
Borghunter's Avatar
 
Name: Mitchell
Location: Calgary, Canada
Trader Rating: (24)
Join Date: Apr 2006
Posts: 1,063
NP$: 156.05 (Donate)
Borghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to all
Wildlife
I don't really care who uses this code.
Can't find out anyways it's in PHP!
__________________
Politics On Fire - Political Debate and Discussions Forum
Borghunter is offline  
  Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wanted - Web Hosting Directory Script. senaia Website Development 3 12-03-2005 06:27 AM
Part time PHP script installer and customer service rep wanted (offer closed) -RJ- Scripts For Sale 2 05-07-2005 12:33 AM
coder wanted for name script ypn Website Development 2 10-09-2003 02:04 PM

Site Sponsors
Thousand Dollar Profits http://www.mobisitetrader.com/ http://www.mobisitetrader.com/
Advertise your business at NamePros
All times are GMT -7. The time now is 08:36 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0