<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SycloneFX.com &#187; random</title>
	<atom:link href="http://www.syclonefx.com/tag/random/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.syclonefx.com</link>
	<description>News &#38; Reviews of Tech, Comics, TV and Video Games</description>
	<lastBuildDate>Fri, 27 Aug 2010 22:57:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Random Linkshare ads PHP Script</title>
		<link>http://www.syclonefx.com/2009/11/01/random-linkshare-ads-php-script/</link>
		<comments>http://www.syclonefx.com/2009/11/01/random-linkshare-ads-php-script/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 13:48:52 +0000</pubDate>
		<dc:creator>syclonefx</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Website Programming]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[linkshare]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.syclonefx.com/?p=198</guid>
		<description><![CDATA[I&#8217;ve been using LinkShare for years and one thing I hate about them is their random ads generator. It doesn&#8217;t work to well. Sometimes you get blank ads, and sometimes the ads are distorted and sometimes you get an ad that should be displayed. So I came up with this little PHP script. There is [...]]]></description>
			<content:encoded><![CDATA[<!--Amazon_CLS_IM_START--><p>I&#8217;ve been using LinkShare for years and one thing I hate about them is their random ads generator. It doesn&#8217;t work to well. Sometimes you get blank ads, and sometimes the ads are distorted and sometimes you get an ad that should be displayed. So I came up with this little PHP script. There is no limit on how many ads you can put in the script.</p>
<div class="code">&lt;?</p>
<p>//set the urls</p>
<p>$urls = array(<br />
&#8220;http://click.linksynergy.com/fs-bin/click?id=Oj2S/gUYGEM&amp;offerid=13850.10000348&amp;type=4&amp;subid=0&#8243;,<br />
&#8220;http://click.linksynergy.com/fs-bin/click?id=Oj2S/gUYGEM&amp;offerid=13850.10000335&amp;type=4&amp;subid=0&#8243;,<br />
&#8220;http://click.linksynergy.com/fs-bin/click?id=Oj2S/gUYGEM&amp;offerid=146261.10005058&amp;type=4&amp;subid=0&#8243;<br />
);</p>
<p>//set the img links</p>
<p>$img = array(<br />
&#8220;http://www.gamestop.com/gs/aflbanners/125x125_eb_re5.jpg&#8221;,<br />
&#8220;http://www.gamestop.com/gs/aflbanners/468x60_gs_dsi.jpg&#8221;,<br />
&#8220;http://images.apple.com/itunesaffiliates/US/2009/10/01/Smallville_s9_300x300.jpg&#8221;<br />
);</p>
<p>//set the alt text s<br />
$alttext = array(<br />
&#8220;GameStop.com &#8211; Resident Evil 5&#8243;,<br />
&#8220;GameStop.com &#8211; Nintendo DSi&#8221;,<br />
&#8220;Apple iTunes &#8211; Smallville&#8221;<br />
);</p>
<p>//set the linkshare images<br />
$lnkimg = array(<br />
&#8220;http://ad.linksynergy.com/fs-bin/show?id=Oj2S/gUYGEM&amp;bids=13850.10000348&amp;type=4&amp;subid=0&#8243;,<br />
&#8220;http://ad.linksynergy.com/fs-bin/show?id=Oj2S/gUYGEM&amp;bids=13850.10000335&amp;type=4&amp;subid=0&#8243;,<br />
&#8220;http://ad.linksynergy.com/fs-bin/show?id=Oj2S/gUYGEM&amp;bids=146261.10005058&amp;type=4&amp;subid=0&#8243;<br />
);</p>
<p>srand(time());</p>
<p>//set the number in (rand()%3); for however many links there are</p>
<p>$random = (rand()%3);</p>
<p>echo (&#8220;&lt;a href = \&#8221;$urls[$random]\&#8221;&gt;<br />
&lt;img alt=\&#8221;$alttext[$random]\&#8221; src=\&#8221;$img[$random]\&#8221;&gt;&lt;/a&gt;<br />
&lt;img border=\&#8221;0\&#8221; width=\&#8221;1\&#8221; height=\&#8221;1\&#8221; src=\&#8221;$lnkimg[$random]\&#8221;&gt;&#8221;);</p>
<p>?&gt;</p></div>
<!--Amazon_CLS_IM_END-->]]></content:encoded>
			<wfw:commentRss>http://www.syclonefx.com/2009/11/01/random-linkshare-ads-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
