Show Multiple Ads php Script 2019

Show Multiple Ads php Script 2019


Show Multiple Ads php Script 2019 simple tutorial to create a Dynamic Ad for your website no matter you if you have 2 banner or 20 this script will be perfect for your ads and cpa product and every time your page is loaded random Ad will show a simple and cool PHP Code To Switching between ads .

let’s begin the Tutorial :

STEP 1 :

a) Create a text file name it adslist.txt and coppy your ads code or banner ads one by one (one by line) .
screenshoot :

b)Coppy Your adslist.txt in the root of your hosting .

STEP 2 :

Your have to choose to coppy the code in your header or you can use a Snippet plugin and in the end you add this line to your footer or in the end of your post to show Dynamic Ad 
<center><h5><font color=Blue size=”6pt”>$adslist[$randomads]</font> <font color=red size=”6pt”></font></h5></center>

Your PHP Code For Dynamic Ad  :

<?php
$file= “adslist.txt”;
$adslist = file($file);
srand((double)microtime()*1000000);
$randomads = rand(0, count($adslist)-1);
$a=2000;
echo “<table border=’2′>
<tr>
<th><center><h5><font color=Blue size=’6pt’>$adslist[$randomads]</font> <font color=red size=’6pt’></font></h5></center></th>
</tr>
</table>”;
?>
Previous
Next Post »