php ad rotator - Web Development and Web Design Codes

Latest

Monday, February 26, 2018

php ad rotator

php ad rotator

php ad rotator
php ad rotator
Hi friends in this php example we will learn how to rotate ads using php..
just use the below php example of php ad php ad rotator ..
index.php
<?php
$banner1 = '<a href="http://codenair.com" target="_blank"><img src="BANNER1_IMG_SRC" alt="CodeNair Banner" title="CodeNair Banner"></a>';
$banner2 = '<a href="ads_two_url" target="_blank"><img src="BANNER2_IMG_SRC" alt="Google Banner" title="Google Banner"></a>';
$banner3 = '<a href="ads_three_url" target="_blank"><img src="BANNER3_IMG_SRC" alt="Facebook Banner" title="Facebook Banner"></a>';
$banner4 = '<a href="ads_four_url" target="_blank"><img src="BANNER4_IMG_SRC" alt="Yahoo Banner" title="Yahoo Banner"></a>';
$banners = array($banner1, $banner2, $banner3, $banner4);
shuffle($banners);
?>
<div>
  <?php print $banners[0] ?>
</div>

That's it friends how to rotate ads using php..if you like this post please share with your friends ..Thank you..

No comments:

Post a Comment

Thank You for Your Comment

Note: Only a member of this blog may post a comment.