<?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>juust ~ php oddities</title>
	<atom:link href="http://www.juust.org/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.juust.org</link>
	<description>Unordered list of one element</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:26:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pagerank sculpting session</title>
		<link>http://www.juust.org/index.php/pagerank-sculpting-session/2010/07/</link>
		<comments>http://www.juust.org/index.php/pagerank-sculpting-session/2010/07/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 14:24:00 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[seo tips and tricks]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1307</guid>
		<description><![CDATA[In the series &#8216;how to manipulate google&#8216; : pagerank sculpting 101.
If I build a site about &#8220;LCD television&#8221; and want to promote three  specific brands/offers, I want Google to index the product/offer-pages  as most important in the site, and not the index page.
How do I achieve that ?
Some basic theory : I have [...]]]></description>
			<content:encoded><![CDATA[<p>In the series &#8216;<em>how to manipulate google</em>&#8216; : pagerank sculpting 101.</p>
<p>If I build a site about &#8220;LCD television&#8221; and want to promote three  specific brands/offers, I want Google to index the product/offer-pages  as most important in the site, and not the index page.</p>
<p>How do I achieve that ?</p>
<p>Some basic theory : I have two rings of pages, one with four pages (B), and one with three (A), linked over one page (AB),</p>
<p>.</p>
<p><img class="alignnone size-medium wp-image-1310" title="pagerank sculpting 000" src="http://www.juust.org/wp-content/uploads/2010/07/pagerank-sculpting-000-300x232.jpg" alt="pagerank sculpting 000" width="300" height="232" /></p>
<p>&#8230;after running that through a pagerank simulation, I get these results :</p>
<table border="0">
<tbody>
<tr>
<td>item</td>
<td>importance</td>
</tr>
<tr>
<td>b</td>
<td>0.97</td>
</tr>
<tr>
<td>ab</td>
<td>1.60</td>
</tr>
<tr>
<td>a</td>
<td>0.73</td>
</tr>
</tbody>
</table>
<p>&#8230;the linking page (AB) sheds its juice to two rings, 3/5 vs 2/5, and by doing so drains the smaller ring. Being the only page that gets links and juice from all other pages, the ab-page itself scores the highest &#8216;importance&#8217; in the website.</p>
<p>Conclusion : adding some subpages in a smaller ring to a page makes it relatively more important in the website.</p>
<p><img class="alignnone size-medium wp-image-1313" title="pagerank sculpting 001" src="http://www.juust.org/wp-content/uploads/2010/07/pagerank-sculpting-001-300x223.jpg" alt="pagerank sculpting 001" width="300" height="223" /></p>
<table border="0">
<tbody>
<tr>
<td>item</td>
<td>importance</td>
</tr>
<tr>
<td>home, prod1, prod3</td>
<td>0.97</td>
</tr>
<tr>
<td>prod2</td>
<td>1.60</td>
</tr>
<tr>
<td>sub</td>
<td>0.73</td>
</tr>
</tbody>
</table>
<p>Let&#8217;s add some more subrings :</p>
<p><img class="alignnone size-medium wp-image-1314" title="pagerank sculpting 002" src="http://www.juust.org/wp-content/uploads/2010/07/pagerank-sculpting-002-276x300.jpg" alt="pagerank sculpting 002" width="276" height="300" /></p>
<table border="0">
<tbody>
<tr>
<td>item</td>
<td>importance</td>
</tr>
<tr>
<td>I, Prod1</td>
<td>0.96</td>
</tr>
<tr>
<td>Prod2, 3</td>
<td>1.58</td>
</tr>
<tr>
<td>sub</td>
<td>0.72</td>
</tr>
</tbody>
</table>
<p><img class="alignnone size-medium wp-image-1311" title="pagerank sculpting 003" src="http://www.juust.org/wp-content/uploads/2010/07/pagerank-sculpting-003-300x264.jpg" alt="pagerank sculpting 003" width="300" height="264" /></p>
<table border="0">
<tbody>
<tr>
<td>item</td>
<td>importance</td>
</tr>
<tr>
<td>home</td>
<td>0.94</td>
</tr>
<tr>
<td>Prod 1,2,3</td>
<td>1.56</td>
<td></td>
</tr>
<tr>
<td>sub</td>
<td>0.72</td>
<td></td>
</tr>
</tbody>
</table>
<p>The importance of the product pages seems to drop, but the ratio prod-n/home improves, so it works out better.</p>
<p><strong>Home-links</strong></p>
<p>By not linking back to the index page from the subpages, the product pages end up with a higher rank within the site.</p>
<p>If I do link from each subpage (S) to the index page (home) (what wordpress themes generally do)</p>
<p><img class="alignnone size-medium wp-image-1312" title="pagerank sculpting 004" src="http://www.juust.org/wp-content/uploads/2010/07/pagerank-sculpting-004-300x268.jpg" alt="pagerank sculpting 004" width="300" height="268" /></p>
<p>&#8230;I get these results&#8230;</p>
<table border="0">
<tbody>
<tr>
<td>item</td>
<td>importance</td>
</tr>
<tr>
<td>home</td>
<td>1.91</td>
</tr>
<tr>
<td>Prod 1,2,3</td>
<td>1.54</td>
</tr>
<tr>
<td>Sub</td>
<td>0.57</td>
</tr>
</tbody>
</table>
<p>&#8230;the home page is indicated as most important in the site, which isn&#8217;t what I wanted, so I omit the home-link on subpages.</p>
<p>End of the sculpting session.</p>
<p>(note: this is, of course, all theoretic)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/pagerank-sculpting-session/2010/07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wish you were here</title>
		<link>http://www.juust.org/index.php/wish-you-were-here/2010/07/</link>
		<comments>http://www.juust.org/index.php/wish-you-were-here/2010/07/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 22:34:06 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[juust]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1281</guid>
		<description><![CDATA[Here is some shot from my new job (&#8217;sailor&#8217;) : basically what we do is sail around all day with guests. 






When we are done sailing we go party with Heidi and Heino and the local clergy






&#8230;or we enjoy the serene peace and beauty of nature and stuff&#8230;






&#8230;all summer&#8230; 
]]></description>
			<content:encoded><![CDATA[<p>Here is some shot from my new job (&#8217;sailor&#8217;) : basically what we do is sail around all day with guests. </p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/terschelling.jpg"><img src="http://www.juust.org/wp-content/uploads/2010/07/terschelling-300x225.jpg" alt="terschelling" title="terschelling" width="300" height="225" class="alignnone size-medium wp-image-1284" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/plaatjes-002-Medium.jpg"><img src="http://www.juust.org/wp-content/uploads/2010/07/plaatjes-002-Medium-300x225.jpg" alt="plaatjes 002 (Medium)" title="plaatjes 002 (Medium)" width="300" height="225" class="alignnone size-medium wp-image-1286" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/eersteling-214-Medium.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/eersteling-214-Medium-300x225.jpg" alt="aldebaran" title="aldebaran" width="300" height="225" class="alignnone size-medium wp-image-1297" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/den-oever.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/den-oever-300x225.jpg" alt="den oever" title="den oever" width="300" height="225" class="alignnone size-medium wp-image-1293" /></a></p>
<p>When we are done sailing we go party with Heidi and Heino and the local clergy</p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/eersteling-148-Medium.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/eersteling-148-Medium-300x225.jpg" alt="eersteling 148 (Medium)" title="eersteling 148 (Medium)" width="300" height="225" class="alignnone size-medium wp-image-1291" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/texel.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/texel-300x225.jpg" alt="texel" title="texel" width="300" height="225" class="alignnone size-medium wp-image-1287" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/eersteling-143-Medium.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/eersteling-143-Medium-300x225.jpg" alt=" dutch clergy" title=" dutch clergy" width="300" height="225" class="alignnone size-medium wp-image-1299" /></a></p>
<p>&#8230;or we enjoy the serene peace and beauty of nature and stuff&#8230;</p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/volendam.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/volendam-300x225.jpg" alt="volendam" title="volendam" width="300" height="225" class="alignnone size-medium wp-image-1296" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/stavoren.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/stavoren-300x225.jpg" alt="stavoren" title="stavoren" width="300" height="225" class="alignnone size-medium wp-image-1288" /></a></p>
<p><a rel="shadowbox nofollow" href="http://www.juust.org/wp-content/uploads/2010/07/laaxum1.jpg"><br />
<img src="http://www.juust.org/wp-content/uploads/2010/07/laaxum1-300x225.jpg" alt="laaxum" title="laaxum" width="300" height="225" class="alignnone size-medium wp-image-1289" /></a></p>
<p>&#8230;all summer&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/wish-you-were-here/2010/07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>interesting : seo panel</title>
		<link>http://www.juust.org/index.php/interesting-seo-panel/2010/07/</link>
		<comments>http://www.juust.org/index.php/interesting-seo-panel/2010/07/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 01:19:24 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[seo tips and tricks]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1278</guid>
		<description><![CDATA[That seems fun, an open source seo toolkit. It is a five second install multi-user package offering simple stats, but more interesting, a semi automated website directory submitter in a clean interface, and could be a valuable service offer if you run an seo community site. 
It is PHP MVC and, what sparked my interest, [...]]]></description>
			<content:encoded><![CDATA[<p>That seems fun, an <a href="http://www.seopanel.in/download/">open source seo toolkit</a>. It is a five second install multi-user package offering simple stats, but more interesting, a semi automated website directory submitter in a clean interface, and could be a valuable service offer if you run an seo community site. </p>
<p>It is PHP MVC and, what sparked my interest, it has a plugin interface.<br />
I love that, It could be going somewhere over the next few years. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/interesting-seo-panel/2010/07/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>availability test</title>
		<link>http://www.juust.org/index.php/availability-test/2010/06/</link>
		<comments>http://www.juust.org/index.php/availability-test/2010/06/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 00:39:01 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1263</guid>
		<description><![CDATA[I was writing an availability test with starttime-endtime, on a database with ICS schedule data from Google Calendar (userid, eventid, starttime, endtime), and i came up with this one :

get all user id&#8217;s
a get id&#8217;s for test.start between table.start and table.end
b get id&#8217;s for test.end between table.start and table.end
c get id&#8217;s for test.start < table.start [...]]]></description>
			<content:encoded><![CDATA[<p>I was writing an availability test with starttime-endtime, on a database with ICS schedule data from Google Calendar (userid, eventid, starttime, endtime), and i came up with this one :</p>
<ul>
<li>get all user id&#8217;s</li>
<li>a get id&#8217;s for test.start between table.start and table.end</li>
<li>b get id&#8217;s for test.end between table.start and table.end</li>
<li>c get id&#8217;s for test.start < table.start and test.end > table.end</li>
<li>merge the three overlapping sets (a b c)</li>
<li>available = the difference between all id&#8217;s and the merged set</li>
</ul>
<p>It works but it takes four queries on the entire table. </p>
<p>Isn&#8217;t there a more intelligent way of doing that ?</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">function</span> maat_agenda_check_available<span class="br0">&#40;</span><span class="re1">$start</span><span class="sy0">,</span> <span class="re1">$end</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">global</span> <span class="re1">$wpdb</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//get all id&#39;s</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$sql</span> <span class="sy0">=</span> <span class="st0">&quot;SELECT userid FROM &quot;</span><span class="sy0">.</span><span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">prefix</span><span class="sy0">.</span><span class="st0">&quot;maat_agenda GROUP BY userid&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$all</span> <span class="sy0">=</span> <span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">get_results</span><span class="br0">&#40;</span><span class="re1">$sql</span><span class="sy0">,</span> ARRAY_A<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//get ids with overlaps</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$a</span> <span class="sy0">=</span> <span class="st0">&quot;SELECT userid FROM &quot;</span><span class="sy0">.</span><span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">prefix</span><span class="sy0">.</span><span class="st0">&quot;maat_agenda WHERE endtime &gt; &quot;</span><span class="sy0">.</span><span class="re1">$start</span><span class="sy0">.</span><span class="st0">&quot; AND starttime &lt; &quot;</span><span class="sy0">.</span><span class="re1">$start</span><span class="sy0">.</span><span class="st0">&quot; GROUP BY userid&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$b</span> <span class="sy0">=</span> <span class="st0">&quot;SELECT userid FROM &quot;</span><span class="sy0">.</span><span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">prefix</span><span class="sy0">.</span><span class="st0">&quot;maat_agenda WHERE endtime &gt; &quot;</span><span class="sy0">.</span><span class="re1">$end</span><span class="sy0">.</span><span class="st0">&quot; AND starttime &lt; &quot;</span><span class="sy0">.</span><span class="re1">$end</span><span class="sy0">.</span><span class="st0">&quot; GROUP BY userid&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$c</span> <span class="sy0">=</span> <span class="st0">&quot;SELECT userid FROM &quot;</span><span class="sy0">.</span><span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">prefix</span><span class="sy0">.</span><span class="st0">&quot;maat_agenda WHERE endtime &lt; &quot;</span><span class="sy0">.</span><span class="re1">$end</span><span class="sy0">.</span><span class="st0">&quot; AND starttime &gt; &quot;</span><span class="sy0">.</span><span class="re1">$start</span><span class="sy0">.</span><span class="st0">&quot; GROUP BY userid&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$rsta</span> <span class="sy0">=</span> <span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">get_results</span><span class="br0">&#40;</span><span class="re1">$a</span><span class="sy0">,</span> ARRAY_A<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$rstb</span> <span class="sy0">=</span> <span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">get_results</span><span class="br0">&#40;</span><span class="re1">$b</span><span class="sy0">,</span> ARRAY_A<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$rstc</span> <span class="sy0">=</span> <span class="re1">$wpdb</span><span class="sy0">-&gt;</span><span class="me1">get_results</span><span class="br0">&#40;</span><span class="re1">$c</span><span class="sy0">,</span> ARRAY_A<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//merge arrays</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="kw3">is_array</span><span class="br0">&#40;</span><span class="re1">$rsta</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re1">$rsta</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="kw3">is_array</span><span class="br0">&#40;</span><span class="re1">$rstb</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re1">$rstb</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="kw3">is_array</span><span class="br0">&#40;</span><span class="re1">$rstc</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re1">$rstc</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$rst</span> <span class="sy0">=</span> <span class="kw3">array_merge</span><span class="br0">&#40;</span><span class="re1">$rsta</span><span class="sy0">,</span> <span class="re1">$rstb</span><span class="sy0">,</span> <span class="re1">$rstc</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//get uniques</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">array_unique</span><span class="br0">&#40;</span><span class="re1">$rst</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="kw3">array_diff</span><span class="br0">&#40;</span><span class="re1">$all</span><span class="sy0">,</span> <span class="re1">$rst</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/availability-test/2010/06/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mayday</title>
		<link>http://www.juust.org/index.php/mayday/2010/05/</link>
		<comments>http://www.juust.org/index.php/mayday/2010/05/#comments</comments>
		<pubDate>Sun, 30 May 2010 20:13:24 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1250</guid>
		<description><![CDATA[Should I write a post about Mayday ? It half reminds me of the fairytale of the princess on the pea. Mayday is when Matt moved the pea slightly to the conservative right and all white hooded princesses made their bid for Drama Queen. 
Personally I hope one day Google split social and business search, [...]]]></description>
			<content:encoded><![CDATA[<p>Should I write a post about Mayday ? It half reminds me of the fairytale of the <a href="http://hca.gilead.org.il/princess.html">princess on the pea</a>. Mayday is when Matt moved the pea slightly to the conservative right and all white hooded princesses made their bid for Drama Queen. </p>
<p>Personally I hope one day Google split social and business search, deprecate the entire web2.0 social linking and switch to real time traffic data as ranking algorithm for social search, and restore the peer reviewed web for business search with a stronger focus on local and regional delivery and consumer reviews as an alternative ranking mechanism.</p>
<p>Current rankings are most decided on the seo-sem effort of companies and don&#8217;t offer end user review on an efficient product list or regional index (aren&#8217;t we lucky we have Google Adwords to help our customers find our offers !). Sites like <a href="http://foursquare.com/">4Square </a> are closing in on delivering search results on local area venues<br />
using the mobile web, which is an interesting development.  </p>
<p>[added 3-6-10] is that just me or did I suddenly notice <a href="http://www.google.com/search?hl=en&#038;safe=off&#038;tbo=p&#038;tbs=frim%3A1&#038;q=juust&#038;aq=f&#038;aqi=g7g-s2g1&#038;aql=&#038;oq=&#038;gs_rfai=">Google doing a Beta for Social Search</a> yesterday ? basically based on its own profile data, and sites and linkdata from my webmaster tools account (I am not unconditionally happy about that).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/mayday/2010/05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wazzup</title>
		<link>http://www.juust.org/index.php/wazzup/2010/05/</link>
		<comments>http://www.juust.org/index.php/wazzup/2010/05/#comments</comments>
		<pubDate>Fri, 07 May 2010 17:41:10 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[juust]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1245</guid>
		<description><![CDATA[I haven&#8217;t touched a website since october. 
]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t touched a website since october. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/wazzup/2010/05/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>p2p with wordpress xml-rpc</title>
		<link>http://www.juust.org/index.php/p2p-with-wordpress-xml-rpc/2010/02/</link>
		<comments>http://www.juust.org/index.php/p2p-with-wordpress-xml-rpc/2010/02/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:49:54 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xml-rpc]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1233</guid>
		<description><![CDATA[Simple fun with Wordpress xml-rpc. I want a way to return a welcome message to interested blog owners. 
To get that done, I make a new plugin that adds a new method to the xml-rpc server. 
The method &#8216;p2p.welcome&#8217; is mapped to the plugin function &#8216;p2p_welcome&#8217;, which returns the &#8220;about yourself&#8221; description of the admin [...]]]></description>
			<content:encoded><![CDATA[<p>Simple fun with Wordpress xml-rpc. I want a way to return a welcome message to interested blog owners. </p>
<p>To get that done, I make a new plugin that adds a new method to the xml-rpc server. </p>
<p>The method &#8216;p2p.welcome&#8217; is mapped to the plugin function &#8216;p2p_welcome&#8217;, which returns the &#8220;about yourself&#8221; description of the admin profile.</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="coMULTI">/*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Plugin Name: P2P rpc</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Description: RPC Peer to Peer stuff</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Version: 1.0.0 &nbsp;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Author: Juust</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Author URI: http://www.juust.org/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/* xmlrpc_methods hooks into IXR_Server */</span> &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">add_filter<span class="br0">&#40;</span> <span class="st0">&#39;xmlrpc_methods&#39;</span><span class="sy0">,</span> <span class="st0">&#39;p2p_xmlrpc_methods&#39;</span> <span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/* pass the $methods array and add a new one */</span> &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> p2p_xmlrpc_methods<span class="br0">&#40;</span> <span class="re1">$methods</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="re1">$methods</span><span class="br0">&#91;</span><span class="st0">&#39;p2p.whoami&#39;</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st0">&#39;p2p_whoami&#39;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw1">return</span> <span class="re1">$methods</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/* the function that returns the profile description of user 1 (admin) */</span> &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> p2p_whoami<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw1">return</span> get_the_author_meta<span class="br0">&#40;</span> <span class="st0">&#39;user_description&#39;</span><span class="sy0">,</span> <span class="nu0">1</span> <span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>I plug that into the wordpress blog.</p>
<p>Then I can make a small test program : </p>
<ul>
<li>include class-IXR.php which has the IXR_Client class</li>
<li>extend IXR_Client as <strong>P2PClient</strong></li>
<li>add a function P2PClient->whoareyou()</li>
<li>&#8230;that calls the new method p2p.whoami on the blog</li>
<li>echo the returned data : the admin profile description</li>
</ul>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">include_once</span><span class="br0">&#40;</span><span class="st0">&#39;/absolute/path/to/class-IXR.php&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">Class</span> P2PClient <span class="kw2">extends</span> IXR_Client <span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="re1">$MyPeerConnection</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="re1">$response</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="re1">$url</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> __construct<span class="br0">&#40;</span><span class="re1">$url</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">url</span> <span class="sy0">=</span> <span class="re1">$url</span><span class="sy0">;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">connect</span><span class="br0">&#40;</span><span class="re1">$url</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//see if there is an xml rpc endpoint</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> connect<span class="br0">&#40;</span><span class="re1">$url</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">MyPeerConnection</span> <span class="sy0">=</span> <span class="kw2">new</span> IXR_Client<span class="br0">&#40;</span><span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">url</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">//query &#39;p2p.whoami&#39;, store the response</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> whoareyou<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">MyPeerConnection</span><span class="sy0">-&gt;</span><span class="me1">query</span><span class="br0">&#40;</span><span class="st0">&#39;p2p.whoami&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">response</span> <span class="sy0">=</span> <span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">MyPeerConnection</span><span class="sy0">-&gt;</span><span class="me1">getResponse</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//init the client, query, echo response</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$p2p</span> <span class="sy0">=</span> <span class="kw2">new</span> P2PClient<span class="br0">&#40;</span><span class="st0">&#39;http://loaneys.com/xmlrpc.php&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$p2p</span><span class="sy0">-&gt;</span><span class="me1">whoareyou</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">echo</span> <span class="st0">&quot;resp &quot;</span><span class="sy0">.</span> <span class="re1">$p2p</span><span class="sy0">-&gt;</span><span class="me1">response</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>That returns : </p>
<blockquote><p>
Hi I am juust, admin of loaneys.com. I worked as business economist at project control and proces automation in engineering and utilities. These days, I do some scripting as a hobby and stick to painting as job.</p></blockquote>
<p>That is a basic way to exchange blog data by extending the xml-rpc endpoint. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/p2p-with-wordpress-xml-rpc/2010/02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
