<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Simple Ad Rotator</title>
	<atom:link href="http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/feed" rel="self" type="application/rss+xml" />
	<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13</link>
	<description>For those who work online</description>
	<pubDate>Sun, 05 Jul 2009 17:22:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tantan</title>
		<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/comment-page-1#comment-28</link>
		<dc:creator>tantan</dc:creator>
		<pubDate>Tue, 05 May 2009 18:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptingblog.com/?p=13#comment-28</guid>
		<description>Nice! I spent a couple of hours to find this script. Finally I got it now. Thank you very much!</description>
		<content:encoded><![CDATA[<p>Nice! I spent a couple of hours to find this script. Finally I got it now. Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christina</title>
		<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/comment-page-1#comment-20</link>
		<dc:creator>Christina</dc:creator>
		<pubDate>Wed, 24 Dec 2008 13:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptingblog.com/?p=13#comment-20</guid>
		<description>Okay, not all of the code came through:


    // creade ads
    $show_ads = "&lt;table width='100%' border='0' cellspacing='0' cellpadding='5' class='ads'&gt;";
    for($i=0; $i&lt;$number_of_ads; $i++){
        $e = $ad[$rand_keys[$i]];
        $show_ads .= "


&lt;tr&gt;&lt;td colspan='2' width='100%'&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width='200'&gt;&lt;div align='center'&gt;{$e[0]}&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;
{$e[1]}
&lt;a href='{$e[3]}' style='font:10pt Arial; color: #009900' target='_blank'&gt;{$e[2]}&lt;/a&gt;&lt;/p&gt;

&lt;p style='text-align:justify;'&gt;{$e[4]}&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;
";
    }
    $show_ads .= "&lt;/table&gt;";
    
    echo $show_ads;
}
    
?&gt;</description>
		<content:encoded><![CDATA[<p>Okay, not all of the code came through:</p>
<p>    // creade ads<br />
    $show_ads = &#8220;&lt;table width=&#8217;100%&#8217; border=&#8217;0&#8242; cellspacing=&#8217;0&#8242; cellpadding=&#8217;5&#8242; class=&#8217;ads&#8217;&gt;&#8221;;<br />
    for($i=0; $i&lt;$number_of_ads; $i++){<br />
        $e = $ad[$rand_keys[$i]];<br />
        $show_ads .= &#8221;</p>
<p>&lt;tr&gt;&lt;td colspan=&#8217;2&#8242; width=&#8217;100%&#8217;&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td width=&#8217;200&#8242;&gt;&lt;div align=&#8217;center&#8217;&gt;{$e[0]}&lt;/div&gt;&lt;/td&gt;<br />
&lt;td&gt;&lt;p&gt;<br />
{$e[1]}<br />
&lt;a href=&#8217;{$e[3]}&#8217; style=&#8217;font:10pt Arial; color: #009900&#8242; target=&#8217;_blank&#8217;&gt;{$e[2]}&lt;/a&gt;&lt;/p&gt;</p>
<p>&lt;p style=&#8217;text-align:justify;&#8217;&gt;{$e[4]}&lt;/p&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&#8220;;<br />
    }<br />
    $show_ads .= &#8220;&lt;/table&gt;&#8221;;</p>
<p>    echo $show_ads;<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christina</title>
		<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/comment-page-1#comment-19</link>
		<dc:creator>Christina</dc:creator>
		<pubDate>Wed, 24 Dec 2008 13:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptingblog.com/?p=13#comment-19</guid>
		<description>Yes, you can use images.  When I was the webmaster for gotostcroix.com and during the redesign we needed to rotate the paid advertisers on the appropriate pages, e.g., resorts.

I also used more fields //USAGE $ad[] = array("Images", "Ad Title and contact info", "display url", "URL","ad copy");

I modified the above to script to:

 // create ads
    $show_ads = "";
    for($i=0; $i&lt;$number_of_ads; $i++){
        $e = $ad[$rand_keys[$i]];
        $show_ads .= "



{$e[0]}

{$e[1]}
&lt;a href='{$e[3]}' rel="nofollow"&gt;{$e[2]}&lt;/a&gt;

{$e[4]}

";
    }
    $show_ads .= "";
    
    echo $show_ads;
}
    
?&gt; 

Example of code:

$ad[] = array("", "&lt;strong&gt;Main Title &lt;/strong&gt;
         Subtitle 
         Phone", "domainname.com", "http://www.domainname.com/",  "Text for ad goes here.");

You can see it in action here: http://www.gotostcroix.com/resorts.php</description>
		<content:encoded><![CDATA[<p>Yes, you can use images.  When I was the webmaster for gotostcroix.com and during the redesign we needed to rotate the paid advertisers on the appropriate pages, e.g., resorts.</p>
<p>I also used more fields //USAGE $ad[] = array(&#8221;Images&#8221;, &#8220;Ad Title and contact info&#8221;, &#8220;display url&#8221;, &#8220;URL&#8221;,&#8221;ad copy&#8221;);</p>
<p>I modified the above to script to:</p>
<p> // create ads<br />
    $show_ads = &#8220;&#8221;;<br />
    for($i=0; $i&lt;$number_of_ads; $i++){<br />
        $e = $ad[$rand_keys[$i]];<br />
        $show_ads .= &#8221;</p>
<p>{$e[0]}</p>
<p>{$e[1]}<br />
<a href='{$e[3]}' rel="nofollow">{$e[2]}</a></p>
<p>{$e[4]}</p>
<p>&#8220;;<br />
    }<br />
    $show_ads .= &#8220;&#8221;;</p>
<p>    echo $show_ads;<br />
}</p>
<p>?&gt; </p>
<p>Example of code:</p>
<p>$ad[] = array(&#8221;", &#8220;<strong>Main Title </strong><br />
         Subtitle<br />
         Phone&#8221;, &#8220;domainname.com&#8221;, &#8220;http://www.domainname.com/&#8221;,  &#8220;Text for ad goes here.&#8221;);</p>
<p>You can see it in action here: <a href="http://www.gotostcroix.com/resorts.php" rel="nofollow">http://www.gotostcroix.com/resorts.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: val</title>
		<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/comment-page-1#comment-17</link>
		<dc:creator>val</dc:creator>
		<pubDate>Tue, 09 Dec 2008 10:31:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptingblog.com/?p=13#comment-17</guid>
		<description>I like this ... I'm looking at it, wondering how I can replace the 'text' with Images - so I can display Banner ads, and/or Text ads - This would allow me to cut out middle men and advertisers can pay ME for spots on my site, or websites; It's late; im going to bed; Im going to contact you about this soon; any ideas on Displaying the Banners would be great :)</description>
		<content:encoded><![CDATA[<p>I like this &#8230; I&#8217;m looking at it, wondering how I can replace the &#8216;text&#8217; with Images - so I can display Banner ads, and/or Text ads - This would allow me to cut out middle men and advertisers can pay ME for spots on my site, or websites; It&#8217;s late; im going to bed; Im going to contact you about this soon; any ideas on Displaying the Banners would be great <img src='http://www.scriptingblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vood</title>
		<link>http://www.scriptingblog.com/php-and-mysql/simple-ad-rotator/13/comment-page-1#comment-9</link>
		<dc:creator>Vood</dc:creator>
		<pubDate>Tue, 04 Nov 2008 05:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptingblog.com/?p=13#comment-9</guid>
		<description>Can you please tell me how i can display and rotate several 125x125 graphics on a page. Also can you show me how to format how they will appear on the page? The graphics that I need to rotate are here... http://www.phatfiber.com/thismonth1.htm
Thanks in advance for any help. I don't know much about how to use PHP script. Thank you.</description>
		<content:encoded><![CDATA[<p>Can you please tell me how i can display and rotate several 125&#215;125 graphics on a page. Also can you show me how to format how they will appear on the page? The graphics that I need to rotate are here&#8230; <a href="http://www.phatfiber.com/thismonth1.htm" rel="nofollow">http://www.phatfiber.com/thismonth1.htm</a><br />
Thanks in advance for any help. I don&#8217;t know much about how to use PHP script. Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
