Rotating banner script

Here you can discuss the various webmaster affiliate programs
User avatar
NoviceAmateurs
Posts: 568
Joined: Sun Jan 27, 2013 5:48 pm
Contact:

Re: Rotating banner script

Postby NoviceAmateurs » Tue Dec 08, 2015 12:56 am

Hey Doc, can you change the link of my TopAmateurs banner to be http://topamateurs.net/index.php?page=in&id=6 rather than just the homepage? This will give Gallery-Dump votes on the list and move it up.
- Free Image Hosting Services
- Free Daily Amateur Photo Sets & Mixes
- Amateur Slut Selfshots & Selfies
- Free Video Tube & Video Hosting
User avatar
Doc
Moderator and Beast Killer
Posts: 2978
Joined: Mon Jun 04, 2007 5:33 pm
Location: Reporting Posts Since Oct 23. 2007
Contact:

Re: Rotating banner script

Postby Doc » Tue Dec 08, 2015 1:12 am



JaDong
Posts: 8
Joined: Tue Dec 22, 2015 8:15 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Rotating banner script

Postby JaDong » Wed Dec 23, 2015 9:00 pm

This is a simple php code to pick a random banner to display.
Just include it on your site.

<?php
$bannerAd[1] = '<a href="url1" target="_blank"><img src="banner1" border="0"></a>';
$bannerAd[2] = '<a href="url2" target="_blank"><img src="banner2" border="0"></a>';
$bannerAd[3] = '<a href="url3" target="_blank"><img src="banner3" border="0"></a>';

$adCount = count($bannerAd);
$randomAdNumber = mt_rand(1, $adCount);
echo $bannerAd[$randomAdNumber];
?>

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 5 guests