<?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>Money-Code &#187; pr</title>
	<atom:link href="http://www.money-code.com/tag/pr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.money-code.com</link>
	<description>Coding For Online Success</description>
	<lastBuildDate>Fri, 12 Feb 2010 18:27:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Show PR for your domains</title>
		<link>http://www.money-code.com/2007/10/show-pr-for-your-domains/</link>
		<comments>http://www.money-code.com/2007/10/show-pr-for-your-domains/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 19:47:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pr]]></category>
		<category><![CDATA[ranking]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>Here is a small PHP script that will loop through a array of domains or take a url argument and show the PR for those domains or a single domain. This uses a great PHP script created by MagicBeanDip for handling the XOR32 for calculating the PR. The PR class is then called and used while looping through the domain array. If you pass in a url paramter (ie: http://www.yourdomain.com/pr.php?url=http://www.anotherdomain.com, you'll see the PR for that single domain only. I could see using this with some AJaX hooks to see how your domains are performing in regards to Google page rank.

<p>Depending on your affiliate strategy, PR can be very important or a non-issue. I personally want my blogs and community sites to rank high, but affiliate store fronts, etc, I could care less, since I'm generally paying to get visitors there any way. It would be nice to get the PR love higher and get free organic traffic there, but at this particular juncture, I'm fine with straight arbitage.




Related posts:<ol><li><a href='http://www.money-code.com/2007/11/google-adsense-how-to-randomize-theme/' rel='bookmark' title='Permanent Link: Google Adsense &#8211; How to randomize theme'>Google Adsense &#8211; How to randomize theme</a></li>
<li><a href='http://www.money-code.com/2009/07/epn-validating-domains/' rel='bookmark' title='Permanent Link: EPN Validating Domains'>EPN Validating Domains</a></li>
<li><a href='http://www.money-code.com/2008/10/dynamic-xmlrss-feed-using-popshops/' rel='bookmark' title='Permanent Link: Dynamic XML/RSS Feed using PopShops'>Dynamic XML/RSS Feed using PopShops</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.money-code.com%2F2007%2F10%2Fshow-pr-for-your-domains%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.money-code.com%2F2007%2F10%2Fshow-pr-for-your-domains%2F" height="61" width="51" /></a></div><p>Here is a small PHP script that will loop through a array of domains or take a url argument and show the PR for those domains or a single domain. This uses a great PHP script created by MagicBeanDip for handling the XOR32 for calculating the PR. The PR class is then called and used while looping through the domain array. If you pass in a url paramter (ie: http://www.yourdomain.com/pr.php?url=http://www.anotherdomain.com, you&#8217;ll see the PR for that single domain only. I could see using this with some AJaX hooks to see how your domains are performing in regards to Google page rank.</p>
<p>Depending on your affiliate strategy, PR can be very important or a non-issue. I personally want my blogs and community sites to rank high, but affiliate store fronts, etc, I could care less, since I&#8217;m generally paying to get visitors there any way. It would be nice to get the PR love higher and get free organic traffic there, but at this particular juncture, I&#8217;m fine with straight arbitage.</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">&lt;?php</span><br />
<span class="co1">// please download the entire script (I&#8217;ve excluded the PR class to keep this small)</span></p>
<p><span class="re0">$oPR</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span class="kw2">new</span> PageRankXor32<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$_GET</span><span class="br0">&#91;</span><span class="st0">&#8216;url&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$url</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span class="re0">$_GET</span><span class="br0">&#91;</span><span class="st0">&#8216;url&#8217;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$PageRank</span>&nbsp; &nbsp; &nbsp; &nbsp;= <span class="re0">$oPR</span>-&gt;<span class="me1">getRank</span><span class="br0">&#40;</span><span class="re0">$url</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$dir</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <a href="http://www.php.net/getcwd"><span class="kw3">getcwd</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$filename</span>&nbsp; &nbsp; &nbsp; &nbsp;= <span class="re0">$dir</span>.<span class="st0">&quot;/images/pr-&quot;</span>.<span class="re0">$PageRank</span>.<span class="st0">&quot;.gif&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$handle</span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; = <a href="http://www.php.net/fopen"><span class="kw3">fopen</span></a><span class="br0">&#40;</span><span class="re0">$filename</span>,<span class="st0">&#8216;r&#8217;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$contents</span>&nbsp; &nbsp; &nbsp; &nbsp;= <a href="http://www.php.net/fread"><span class="kw3">fread</span></a><span class="br0">&#40;</span><span class="re0">$handle</span>,<a href="http://www.php.net/filesize"><span class="kw3">filesize</span></a><span class="br0">&#40;</span><span class="re0">$filename</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span class="kw3">header</span></a><span class="br0">&#40;</span><span class="st0">&quot;Content-type: image/jpeg&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$contents</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/fclose"><span class="kw3">fclose</span></a><span class="br0">&#40;</span><span class="re0">$handle</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$siteArr</span>&nbsp; &nbsp; &nbsp; &nbsp; = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;http://www.domain1.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain2.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain3.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain4.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain5.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain6.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain7.com&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;http://www.domain8.com&#8217;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;table cellpadding=0 cellspacing=0 border=0 valign=<span class="es0">\&quot;</span>top<span class="es0">\&quot;</span>&gt;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$siteArr</span> <span class="kw1">as</span> <span class="re0">$item</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$PageRank</span> &nbsp; &nbsp; &nbsp; = <span class="re0">$oPR</span>-&gt;<span class="me1">getRank</span><span class="br0">&#40;</span><span class="re0">$item</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//echo $PageRank.&quot;&lt;br&gt;&quot;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$image</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span class="st0">&quot;images/pr-&quot;</span>.<span class="re0">$PageRank</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$PageRank</span> == <span class="st0">&#8216;-1&#8242;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$image</span> &nbsp;= <span class="st0">&quot;images/pr-0&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;tr&gt;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;td valign=<span class="es0">\&quot;</span>middle<span class="es0">\&quot;</span>&gt;&quot;</span>.<a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;http://&quot;</span>,<span class="st0">&quot;&quot;</span>,<span class="re0">$item</span><span class="br0">&#41;</span>.<span class="st0">&quot;&lt;/td&gt;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;td valign=<span class="es0">\&quot;</span>middle<span class="es0">\&quot;</span>&gt;&lt;img src=<span class="es0">\&quot;</span>&quot;</span>.<span class="re0">$image</span>.<span class="st0">&quot;.gif<span class="es0">\&quot;</span>&gt;&lt;br&gt;&lt;/td&gt;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/tr&gt;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/table&gt;&quot;</span>;<br />
<span class="kw2">?&gt;</span><br />
&nbsp;</div>
<p>The entire script and images have been zipped and can be downloaded <a href="http://www.money-code.com/files/pr.zip" target="_blank"><u>here</u></a>.</p>


<p>Related posts:<ol><li><a href='http://www.money-code.com/2007/11/google-adsense-how-to-randomize-theme/' rel='bookmark' title='Permanent Link: Google Adsense &#8211; How to randomize theme'>Google Adsense &#8211; How to randomize theme</a></li>
<li><a href='http://www.money-code.com/2009/07/epn-validating-domains/' rel='bookmark' title='Permanent Link: EPN Validating Domains'>EPN Validating Domains</a></li>
<li><a href='http://www.money-code.com/2008/10/dynamic-xmlrss-feed-using-popshops/' rel='bookmark' title='Permanent Link: Dynamic XML/RSS Feed using PopShops'>Dynamic XML/RSS Feed using PopShops</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.money-code.com/2007/10/show-pr-for-your-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->