<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>MikeSchinkel.com</title>
	<link>http://mikeschinkel.com</link>
	<description>The Web Marketing Technologist - Specializing in Contrarianism</description>
	<pubDate>Fri, 15 Aug 2008 18:23:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Event: Why you MUST have a Twitter Strategy</title>
		<link>http://mikeschinkel.com/blog/event-why-you-must-have-a-twitter-strategy/</link>
		<comments>http://mikeschinkel.com/blog/event-why-you-must-have-a-twitter-strategy/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 18:19:19 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Atlanta]]></category>

		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[driveafastercar]]></category>

		<category><![CDATA[paulstamatiou]]></category>

		<category><![CDATA[people]]></category>

		<category><![CDATA[sanjayparekh]]></category>

		<category><![CDATA[stammy]]></category>

		<category><![CDATA[strategy]]></category>

		<category><![CDATA[tessahorehled]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/event-why-you-must-have-a-twitter-strategy/</guid>
		<description><![CDATA[
Just an announcement that we are going to be discussing Why you MUST have a Twitter Strategy at Atlanta Web Entrepreneurs&#160;on August 21, 2008.
I&#8217;m going to present a short intro/overview to Twitter and then, god willing and the creek don&#8217;t rise, we plan to&#160;have two (2) video conferences, one from Triangle Tweetup&#160;and the other from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com"><img height="49" alt="" hspace="10" width="210" align="right" vspace="10" border="0" src="http://assets2.twitter.com/images/twitter.gif?1218751192" /></a></p>
<p>Just an announcement that we are going to be discussing <a target="_blank" href="http://web.meetup.com/32/calendar/8361289/">Why you MUST have a Twitter Strategy</a> at <a target="_blank" href="http://atlanta-web.org">Atlanta Web Entrepreneurs</a>&nbsp;on August 21, 2008.</p>
<p>I&#8217;m going to present a short intro/overview to Twitter and then, god willing and the creek don&#8217;t rise, we plan to&nbsp;have two (2) video conferences, one from <a target="_blank" href="http://triangletweetup.pbwiki.com/">Triangle Tweetup</a>&nbsp;and the other from a <strong><em>soon-to-be-announced</em></strong> Industry luminary with <strong>over 25,000</strong>&nbsp;Twitter followers!</p>
<p>After the 8pm break we&#8217;ll have a roundtable-less discussion and Q&amp;A led by our featured participants:</p>
<ul>
<li><a target="_blank" href="http://www.sanjayparekh.com/"><strong>Sanjay Parekh</strong></a>&nbsp;(<a target="_blank" href="http://twitter.com/sanjay">sanjay</a> on Twitter),</li>
<li><b><a target="_blank" href="http://www.driveafastercar.com/">Tessa Horehled</a></b>&nbsp;(<a target="_blank" href="http://twitter.com/driveafastercar">driveafastercar</a> on Twitter) and</li>
<li><b><a target="_blank" href="http://paulstamatiou.com/">Paul Stamatiou</a>&nbsp;</b>(<a target="_blank" href="http://twitter.com/stammy">stammy</a> on Twitter)<b>.</b></li>
</ul>
<p>Anyone that wants to attend should first be sure to have a Twitter account and to follow <a target="_blank" href="http://twitter.com/atlantaweb">atlantaweb</a>. We&#8217;ll use that list as a roll call for the meeting and we&#8217;ll announce our special guest on the <a target="_blank" href="http://twitter.com/atlantaweb">atlantaweb</a>&nbsp;Twitter account by 6pm Wednsday August 20th.</p>
<p>For more details and to RSVP see go <a target="_blank" href="http://web.meetup.com/32/calendar/8361289/">here</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/event-why-you-must-have-a-twitter-strategy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is .COM Still Required for Mainstream Success?</title>
		<link>http://mikeschinkel.com/blog/is-com-still-required/</link>
		<comments>http://mikeschinkel.com/blog/is-com-still-required/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 05:58:09 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[.com]]></category>

		<category><![CDATA[.tv]]></category>

		<category><![CDATA[.us]]></category>

		<category><![CDATA[branding]]></category>

		<category><![CDATA[delicious]]></category>

		<category><![CDATA[domain names]]></category>

		<category><![CDATA[dotcom]]></category>

		<category><![CDATA[tagging]]></category>

		<category><![CDATA[urls]]></category>

		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/is-com-still-required-for-mainstream-success/</guid>
		<description><![CDATA[
It&#8217;s been almost fifteen years now since the web first hit it&#8217;s tipping point and transitioned from an academic&#8217;s playground and a mere curiosity for the average person to the decidedly mainstream global change agent that now drives trillions of dollars in global value creation annually. During that time we&#8217;ve gone from asking &#34;What&#8217;s this [...]]]></description>
			<content:encoded><![CDATA[<div class="image right"><img style="margin: 1em 1em 1em 0px" height="176" alt="delicious .US domain is now the Dunce" width="256" border="0" src="http://mikeschinkel.com/images/del.icio.us.dunce.gif" /></div>
<p>It&#8217;s been almost fifteen years now since the web first hit it&#8217;s tipping point and transitioned from an academic&#8217;s playground and <a target="_blank" href="http://www.funny-videos.co.uk/videotheinternet.html">a mere curiosity</a> for the average person to the decidedly mainstream global change agent that now drives trillions of dollars in global value creation annually. During that time we&#8217;ve gone from asking &quot;<em>What&#8217;s this &#8216;World Wide Web&#8217; thingy the geeks keep talking about</em>?&quot; to rapidly seeing Web-based services dominant the activities of practically every business person alive. In the days of the first Internet &quot;<em>gold rush</em>&quot; a.k.a. the &quot;<em><a target="_blank" href="http://en.wikipedia.org/wiki/Dot-com_bubble">dotcom bubble</a>&quot; </em>it seems that everyone and their brother grabbed a .COM domain, or ten, and set out to strike it rich.&nbsp; Back then you really didn&#8217;t even consider getting anything besides a .COM for your website business but that was okay because many good brand names could be created from still available .COM domains.</p>
<p>Fast forward a decade and great .COM domain names have became scare and even good .COM domain names are hard to come by especially with all the domain squatters.&nbsp; In addition a lot more top-level domains have opened up, and many small countries such as <a target="_blank" href="http://en.wikipedia.org/wiki/Tuvalu">Tuvalu</a> (<a target="_blank" href="http://www.tv/">.tv</a>) have decided to cash in on their (un)natural resources. And just as fashions change, some creative types who needed a good domain name chose to forgo the .COM status quo and the &quot;<em>www.</em>&quot; sub-domain convention and instead compose domain names from words by ignoring the domain level separators (i.e the periods &quot;.&quot;) From this trend popular websites with domain names like <a href="http://del.icio.us">http://del.icio.us</a> (aka &quot;<em>delicious</em>&quot;) were born.</p>
<p>If you are not familiar with delicious it is essentially a website to store your web bookmarks, but storing them &quot;<em>in the cloud</em>&quot; as opposed to in your browser. And one of it&#8217;s best innovations, since mimicked by thousands of other sites, it the ability to allow users to categorize with freeform &quot;tags&quot; and later recall their bookmarks by the tags they assigned. These tags are just words, any words your chose, such as &quot;<em>marketing</em>&quot;, &quot;<em>video</em>&quot;, &quot;<em>php</em>&quot;, &quot;<em>bestpractices</em>&quot; or even &quot;<em>shoes</em>.&quot;&nbsp; What words you use to tag with is totally up to you.&nbsp;</p>
<p><a title="Mike Schinkel's delicious Links" target="_blank" href="http://delicious.com/MikeSchinkel/">I&#8217;ve been using delicious for several years now</a> and at this point not a day goes while surfing the web that I don&#8217;t tag at least one website for future reference.&nbsp; You can even use it to create lists of sites groups by a tag and then send those links to others so they too can see your list of links. But I digress; there is a lot more to delicious but the subject of this post is the .COM domain so we&#8217;ll my detailed description of del.icio.us for another day.</p>
<p>As delicious got more popular with the many influencers on the web, <a target="_blank" href="http://www.yahoo.com">Yahoo</a> stepped in and bought them.&nbsp; Since then delicious has languished for years, still there but never updated. Probably the best thing that has happened to delicious during that period was Firefox built delicious tagging into their browser as their favorites list &#8212; if you choose to let Firefox use delicious for you &#8212; and the fact that since it hasn&#8217;t changed it&#8217;s been a pretty stable target for people who wanted to use to <a target="_blank" href="http://delicious.com/help/api">delicious API</a> to create add-on functionality and integrations.</p>
<div class="image left"><img style="margin: 1em 0px 0px 1em" height="192" alt="delicious .COM domain is the new King" width="448" border="0" src="http://mikeschinkel.com/images//delicious.com.king.gif" /></div>
<p>So, after years of languishing it turns out Yahoo has been paying attention to delicious behind the scenes, and behold; there is <a target="_blank" href="http://blog.delicious.com/blog/2008/07/oh-happy-day.html">a new delicious</a>! <a class="footnote-ref" href="http://mikeschinkel.com/blog/is-com-still-required/#secret-weapon-20080608">[1]</a>&nbsp; What&#8217;s more, Yahoo has <a target="_blank" href="http://en.wikipedia.org/wiki/URL_redirection">redirected</a> all attempts to access delicious at <a href="http://del.icio.us">http://del.icio.us</a> to instead find delicious at <a title="http://delicious.com/" href="http://delicious.com/">http://delicious.com/</a> and thus, in one fell swoop, have extinguished the quirky domain name that was in part why the web&#8217;s tastemakers first took note of delicious. The powers that be at Yahoo probably choose to do this because of usability data I expect they&#8217;ve collected that probably told them that the &quot;<em>in crowd</em>&quot; got the funny spelling but that the vast majority of users were simply confused.</p>
<p>Which brings me to the crux of my post where I posit the following:</p>
<blockquote>
<p><em>Are .COM domains still required for commercial success in a mainstream website?</em> <em>Or or those rushing to get domain names with all the </em><a target="_blank" href="http://www.icann.org/en/announcements/announcement-4-26jun08-en.htm"><em>new top level domains</em></a><em> simply exercising futility?&nbsp; Were all these idiosyncratic domain names merely a fad and now we&#8217;re back to business with .COM, or did Yahoo </em><a target="_blank" href="http://en.wikipedia.org/wiki/Jumping_the_shark"><em>jumped the shark</em></a><em> on this one?<a class="footnote-ref" href="http://mikeschinkel.com/blog/is-com-still-required/#my-preference-20080608">[2]</a></em>&nbsp;</p>
</blockquote>
<p>So what do you think?&nbsp;</p>
<div class="footnotes" id="footnotes-20080608">
<h3>Footnotes</h3>
<ol>
<li id="secret-weapon-20080608">Frankly I&#8217;ve long thought delicious to be Yahoo&#8217;s secret weapon with Yahoo just not yet realizing it. And it&#8217;s no wonder they haven&#8217;t realized it as anyone who&#8217;s paid attention what the critics have been saying about&nbsp;Yahoo being <a title="Yahoo Memo: The 'Peanut Butter Manifesto'" target="_blank" href="http://online.wsj.com/public/article/SB116379821933826657-0mbjXoHnQwDMFH_PVeb_jqe3Chk_20061125.html">spread too thin</a>. But that is all an entirely different topic and way beyond the scope of this post, yet again.</li>
<li id="my-preference-20080608">While part of me feels the pang of loss from this change and what it may imply about the use of other non-.COM domains, I find that I quite prefer using <a href="http://delicious.com">http://delicious.com</a> when compared to the original <a href="http://del.icio.us">http://del.icio.us</a> domain.</li>
</ol>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/is-com-still-required/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anti-Follow Spam for Twitter</title>
		<link>http://mikeschinkel.com/blog/twitter-anti-follow-spam/</link>
		<comments>http://mikeschinkel.com/blog/twitter-anti-follow-spam/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 00:15:48 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Opinion]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[antispam]]></category>

		<category><![CDATA[follower]]></category>

		<category><![CDATA[ratio]]></category>

		<category><![CDATA[solutions]]></category>

		<category><![CDATA[spam]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/twitter-anti-follow-spam/</guid>
		<description><![CDATA[
Wall of Spam courtesy of freezelight and enabled by Creative Commons

Damon Clinkscales blogged about Twitter Spam last month where he advocated proactively cleansing one follower&#8217;s list of &#34;follow spammers&#34; to help reduce the load on Twitter, improve Twitter&#8217;s reliability, and increase the value of the Twitter community in general.
I agree!
Still, I think Twitter could take [...]]]></description>
			<content:encoded><![CDATA[<div class="image right"><a title="freezelight's Wall of Spam on Flickr" target="_blank" href="http://www.flickr.com/photos/63056612@N00/155554663/"><img height="180" alt="No Twitter Spam!" width="240" border="0" src="http://mikeschinkel.com/images/no-twitter-spam.jpg" /></a>
<div class="caption" style="width: 240px"><a target="_blank" href="http://www.flickr.com/photos/63056612@N00/155554663/"><i><b>Wall of Spam</b></i></a> courtesy of <a target="_blank" href="http://www.flickr.com/photos/63056612@N00/">freezelight</a> and enabled by <a target="_blank" href="http://creativecommons.org">Creative Commons</a></div>
</div>
<p>Damon Clinkscales blogged about <a target="_blank" href="http://damonc.com/past/femmebots-and-other-twitter-spammers-must-die/">Twitter Spam</a> last month where he <strong>advocated proactively cleansing one follower&#8217;s list of &quot;follow spammers&quot; </strong>to help reduce the load on <a target="_blank" href="http://twitter.com/">Twitter</a>, improve Twitter&#8217;s reliability, and increase the value of the Twitter community in general.</p>
<p><strong>I agree!</strong></p>
<p>Still, I think Twitter could take a proactive step reasonably easy that would make it so we don&#8217;t have to. I think Twitter could reduce most of the type of <a target="_blank" href="http://twitter.com/MikeSchinkel/statuses/876671517">Twitter follower spam I got today</a> by applying two simple criteria (And I think Damon also got that same spam today. BTW, nice blog theme Damon! ;-)</p>
<p>I think a <strong>strong <em>indication</em> </strong>of Twitter follower spam is simply:</p>
<ol>
<li>Their <a title="Mike Schinkel's Delicious list of blog posts about Twitter Following/Follower ratio" target="_blank" href="http://delicious.com/MikeSchinkel/twitter+ratio"><strong>following/follower ratio</strong></a> (or their <em><strong><i>ing/er</i></strong> </em>ratio for short), and</li>
<li>Their <strong>follow rate </strong>(i.e. how quickly they follow someone after that last time they followed someone.)&nbsp;</li>
</ol>
<p>This spammer <a target="_blank" href="http://twitter.com/MikeSchinkel/statuses/876671517">I got today</a> followed me with 4 different Twitter accounts within a few minutes and each account had around 2000 followings and just over 10 followers making their <i>ing/er</i> ratio about 20-to-1 and I&#8217;ll bet their followers were all auto-followed. <a target="_blank" href="http://twitter.com/ianonmac/statuses/876418949">It&#8217;s</a> <a target="_blank" href="http://twitter.com/glittermonkey/statuses/876873690">also</a> <a target="_blank" href="http://twitter.com/brianculler/statuses/876641377">clear</a> <a target="_blank" href="http://twitter.com/demaderios/statuses/876869364">from</a> <a target="_blank" href="http://twitter.com/FearMediocrity/statuses/870626646">the</a> <a target="_blank" href="http://twitter.com/justex07/statuses/876490184">fast</a> <a target="_blank" href="http://twitter.com/april_anita/statuses/876873075">&amp;</a>&nbsp;<a target="_blank" href="http://twitter.com/gcn1/statuses/870464948">furious</a> <a target="_blank" href="http://twitter.com/charbarred/statuses/870486631">tweets</a> that I was not their&nbsp;only mark.</p>
<p>I think it would be reasonable for Twitter to <strong>auto-block</strong> anyone with a ratio of greater than 15-to-1 <i>ing/er</i> ratio. Twitter could even remove the auto-followers from the calculation; those that follow within around 90 seconds of being followed wouldn&#8217;t count as a follower. Doing this Twitter would still give someone the ability to follow 15 people for every one that follows them, and heck they could give them their first 150 people<a href="#relationship-max-2008-08-03">[1]</a> for &quot;free&quot; (i.e. not counting against the limit.) If someone really wants to follow 15,000 people they need to be interesting enough to have at least 1000 people follow them. Shouldn&#8217;t be that hard&#8230;</p>
<p>Also, Twitter could <strong>limit followings per day </strong>to, say, 75.&nbsp; That should be enough for anyone, even the most hard-core twitter newbie (150 &quot;free&quot; + 75 more), and it&#8217;s not unreasonable to require a newbie to wait a few days to follow lots and lots of people.&nbsp;</p>
<p>If I were in charge of setting these limits, I&#8217;d set the <i>ing/er</i> <em>ratio </em>to 5-to-1, give them only 25 &quot;free&quot; and then limit to 25 followings per 24 hour period, but I shot high because I was trying to be &quot;<em>reasonable</em>.&quot; Of course, Twitter could allow for special cases by allowing people to request to have those limits manually raised if they provide a good justification for it.</p>
<p>What do you think?&nbsp; Would this work to reduce most Twitter follow spam?&nbsp; I think so.</p>
<div class="footnotes" id="footnotes-2008-08-03">
<h3>Footnotes</h3>
<ul>
<li id="relationship-max-2008-08-03">150 is an oft-quoted <a target="_blank" href="http://en.wikipedia.org/wiki/Dunbar's_number" name="Dunbar's Number (150) of Maximum Relationships">maximum number of relationships</a> that most people can maintain.</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/twitter-anti-follow-spam/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RESTful Web Services in a WordPress Plugin?</title>
		<link>http://mikeschinkel.com/blog/restful-web-services-in-wordpress-plugin/</link>
		<comments>http://mikeschinkel.com/blog/restful-web-services-in-wordpress-plugin/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 05:00:39 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[rest]]></category>

		<category><![CDATA[restful]]></category>

		<category><![CDATA[web services]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/restful-web-services-in-wordpress-plugin/</guid>
		<description><![CDATA[So I&#8217;ve got a project where I need to have a Flash component built in Flex to call to a WordPress blog and get information about it&#8217;s latest post. Should be no problem right?&#160; The easy way to do this would be to just write a &#8220;rest.php&#8221; file and brute-force all the setup that WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve got a project where I need to have a Flash component built in Flex to call to a WordPress blog and get information about it&#8217;s latest post. Should be no problem right?&nbsp; The easy way to do this would be to just write a &#8220;rest.php&#8221; file and brute-force all the setup that WordPress does but I thought it would be so much more valuable to implement this as a plug-in.</p>
<p>I figured that I&#8217;d just quickly learn how to build a WordPress plug-in and create one for exposing RESTful web services; after all with a year of programming Drupal modules WordPress&#8217; plug-in API can&#8217;t be that hard, right?&nbsp; Well turns out it wasn&#8217;t that easy and I think I have run into a design limitation with WordPress and I&#8217;m beginning to wish I&#8217;d just taken the brute-force approach and said to hell with writing a plug-in.</p>
<p>Although I am not 100% certain, and I hope someone can point out that I&#8217;m just doing something wrong, it seems sadly like I&#8217;m pushing the edges of the WordPress API and exposing where it&#8217;s design falls short. By the way, I&#8217;m working with WordPress v2.5 because why upgrade mid-project when god knows if WordPress will release another in the remaining days before this project is done and I&#8217;ll just have to do again before deployment?</p>
<p>Here&#8217;s the details.&nbsp; I started writing a plug-in called &#8220;<em>RESTful Services</em>&#8221; with a goal of implementing URLs that behave in the following fashion; {format} could potentially be html, xhtml, json, xml, rss, atom, etc.:</p>
<dl>
<dt><a href="http://example.com/services.{format">http://example.com/services.{format</a>} </dt>
<dd>Provide a list of RESTful services in specified {format}, defaults to html </dd>
<dt><a href="http://example.com/services/{service}.{format}/{data}?{params">http://example.com/services/{service}.{format}/{data}?{params</a>}&nbsp; </dt>
<dd>Provide a RESTful service in specified {format}, defaults to html, with optional provided data and parameters. </dd>
</dl>
<p>But before I got all those options working I just wanted to service a page from my RESTful Services plugin where Content-Type: text/plain. I found <a target="_blank" href="http://codex.wordpress.org/Custom_Queries#Permalinks_for_Custom_Archives">this page</a> that professes to explain how to hook into the URL routing and after a few fits and starts I can came up with the following code for my plugin that would indeed response to my <a href="http://example.com/services">http://example.com/services</a> URL:</p>
<h3>wp-content/plugins/restful-services/restful-web-services.php:</h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p6299');">[<span id="p6299_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p6299"><td width="1%" class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p629code9"><pre class="php">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'restful_services_flush_rewrite_rules'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> restful_services_flush_rewrite_rules<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>    
  <span style="color: #990000;">global</span> <span style="color: #000033;">$wp_rewrite</span><span style="color: #339933;">;</span>
  <span style="color: #000033;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">flush_rules</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>       
&nbsp;
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'generate_rewrite_rules'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'restful_services_add_rewrite_rules'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> restful_services_add_rewrite_rules<span style="color: #009900;">&#40;</span> <span style="color: #000033;">$wp_rewrite</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>      
  <span style="color: #000033;">$new_rules</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>        
    <span style="color: #0000ff;">'services'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'wp-content/plugins/restful-services/rest.php'</span><span style="color: #339933;">,</span>     
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000033;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rules</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$new_rules</span> <span style="color: #339933;">+</span> <span style="color: #000033;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rules</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The problem with the above was that it wouldn&#8217;t call &#8220;<em>wp-content/plugins/restful-services/rest.php</em>&#8220;; it would simply continued to call &#8220;index.php&#8221; and display the home page!&nbsp; After literally hours and hours of debugging with my trusty <a target="_blank" href="http://www.nusphere.com/products/phped.htm">PhpEd IDE &#038; debugger</a> I was able to find that the code on lines 737 &#038; 738 of &#8220;<em>wp-includes/query.php</em>&#8221; told WordPress that my service was the home page! It is almost seems like the &#8220;<em>generate_rewrite_rules&#8221;</em> was implemented as &#8220;<em>a good idea</em>&#8221; yet no testing has ever been done on it because for the best I can tell it doesn&#8217;t work. (Note I&#8217;ve reformatted the code to multiple lines so that it is easier to read and does not extend past the right margin of my blog):</p>
<h3><strong>wp-includes/query.php:</strong></h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62910');">[<span id="p62910_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62910"><td class="code" id="p629code10"><pre class="php"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_singular</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_archive</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_search</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_feed</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_trackback</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_404</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_admin</span>                           
      <span style="color: #339933;">||</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_comments_popup</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>   
       <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_home</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I could possibly hack it to get past this by setting one of those to &#8220;true&#8221;, but none of them are really appropriate; there is nothing there quite like an &#8220;is_service&#8221; instance variable. Setting something like &#8220;this->is_singular&#8221; or &#8220;this->is_feed&#8221; might work but it could manifest incompatibility problems with other plugins or future versions of WordPress. Frankly it was rather disappointing to discover this because it tells me that WordPress has hard-coded all the potential scenarios and doesn&#8217;t really have a way around it. Seems to me there should really be a hook here and the type of pages should be allowed to be expanded by plugins rather than be hardcoded as <em>only </em>one of &#8217;singular&#8217;, &#8216;archive&#8217;, &#8217;search&#8217;, &#8216;feed&#8217;, &#8230; and &#8216;home.&#8217;</p>
<p>Anyway, where this manifests itself is &#8220;<em>wp-includes/template-loader.php</em>&#8221; file which I have included in it&#8217;s entirety below.&nbsp; It is on lines 24 and 25 where the template loader loaded the home page because it&#8217;s not possible to specify otherwise:</p>
<h3><strong>wp-includes/template-loader.php:</strong></h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62911');">[<span id="p62911_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code11'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62911"><td width="1%" class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
</pre></td><td class="code" id="p629code11"><pre class="php"><span style="color: #666666; font-style: italic;">/**
 * Loads the correct template based on the visitor's url
 * @package WordPress
 */</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_USE_THEMES'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">constant</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_USE_THEMES'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_redirect'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000033;">$is_home</span> <span style="color: #339933;">=</span> is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_robots<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_robots'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    do_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_trackback<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-trackback.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_404_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_search_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_home_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_attachment<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_attachment_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    remove_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'prepend_attachment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_single_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_page_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_category_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_tag_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_tax<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_taxonomy_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_author_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_date_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_archive<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_archive_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_comments_popup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_comments_popup_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_paged<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$template</span> <span style="color: #339933;">=</span> get_paged_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$template</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/index.php&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/index.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Process feeds and trackbacks even if not using themes.</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_robots<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_robots'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    do_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_trackback<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-trackback.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Still another problem in this puzzle is the <em>$wp->send_headers()</em> method shown being called here on line 293 of &#8220;<em>wp-includes/classes.php&#8221;</em><strong>:</strong></p>
<h3>wp-includes/classes.php:</h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62912');">[<span id="p62912_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62912"><td width="1%" class="line_numbers"><pre>290
291
292
293
294
295
296
297
298
</pre></td><td class="code" id="p629code12"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #009900;">&#40;</span><span style="color: #000033;">$query_args</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>   
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parse_request</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query_args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send_headers</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">handle_404</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
  <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register_globals</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
  do_action_ref_array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000033;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The problem with the <em>$wp->send_headers()</em>, also from &#8220;<em>wp-includes/classes.php&#8221;</em>, is that it seems to have the option of either serving an HTML content type on line 183 and 185, or a content type based on a feed (the content types for the feeds are set in their respective &#8220;<em>wp-includes/feed-*.php&#8221;</em> files) but no custom content types as far as I can determine as there seems to be no way to override calling this function or the logic path contained within:</p>
<h3>wp-includes/classes.php:</h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62913');">[<span id="p62913_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code13'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62913"><td width="1%" class="line_numbers"><pre>175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
</pre></td><td class="code" id="p629code13"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> send_headers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #339933;">@</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'X-Pingback: '</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pingback_url'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    nocache_headers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'error'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">'404'</span> <span style="color: #339933;">==</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'error'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    status_header<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">404</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
      nocache_headers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">@</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: '</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'html_type'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'; charset='</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feed'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #339933;">@</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: '</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'html_type'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'; charset='</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// We're showing a feed, so WP is indeed the only thing that last changed</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'withcomments'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'withoutcomments'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'p'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
          <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
          <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
          <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pagename'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
          <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
          <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachment_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#41;</span>
      <span style="color: #000033;">$wp_last_modified</span> <span style="color: #339933;">=</span> mysql2date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'D, d M Y H:i:s'</span><span style="color: #339933;">,</span> get_lastcommentmodified<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GMT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' GMT'</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">else</span>
      <span style="color: #000033;">$wp_last_modified</span> <span style="color: #339933;">=</span> mysql2date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'D, d M Y H:i:s'</span><span style="color: #339933;">,</span> get_lastpostmodified<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GMT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' GMT'</span><span style="color: #339933;">;</span>
    <span style="color: #000033;">$wp_etag</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$wp_last_modified</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">@</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Last-Modified: $wp_last_modified&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">@</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ETag: $wp_etag&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Support for Conditional GET</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_IF_NONE_MATCH'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #000033;">$client_etag</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_IF_NONE_MATCH'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #000033;">$client_etag</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000033;">$client_last_modified</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_IF_MODIFIED_SINCE'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_IF_MODIFIED_SINCE'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// If string is empty, return 0. If not, attempt to parse into a timestamp</span>
    <span style="color: #000033;">$client_modified_timestamp</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$client_last_modified</span> ? <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_last_modified</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Make a timestamp for our most recent modification...</span>
    <span style="color: #000033;">$wp_modified_timestamp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$wp_last_modified</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_last_modified</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000033;">$client_etag</span><span style="color: #009900;">&#41;</span> ?
         <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_modified_timestamp</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000033;">$wp_modified_timestamp</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_etag</span> <span style="color: #339933;">==</span> <span style="color: #000033;">$wp_etag</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
         <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_modified_timestamp</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000033;">$wp_modified_timestamp</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000033;">$client_etag</span> <span style="color: #339933;">==</span> <span style="color: #000033;">$wp_etag</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      status_header<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">304</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  do_action_ref_array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'send_headers'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000033;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Still, I was able to come up with a solution although it is so very hackish.&nbsp; My solution was to hook the &#8220;<em>template_redirect</em>&#8221; action on line 7 of &#8220;<em>wp-includes/template-loader.php</em>&#8221; (see code from that file above.) Though it seems to works thus far, my solution just feels wrong for the following reasons:</p>
<ol>
<li>It ignores the fact that WordPress continues to think that my web service URL is the home page,</li>
<li>It first lets &#8220;<em>$wp->send_headers()</em>&#8221; set the content type before it overrides it,</li>
<li>It uses an &#8220;<em>exit&#8221; </em>rather than a return to keep WordPress from serving up the home page template, and</li>
<li>It doesn&#8217;t use the routing mechanism apparent built into WordPress (see &#8220;null&#8221; on line 30 of &#8220;<em>wp-content/plugins/restful-services/restful-web-services.php</em>&#8221; below, I assume it should have been the URL of the .php file I plan to execute but WordPress doesn&#8217;t see to use what I put there.)</li>
</ol>
<p>The function &#8220;<em>restful_web_services_exec_service()</em>&#8221; is what is called to execute the appropriate web service:</p>
<h3>wp-content/plugins/restful-services/restful-web-services.php:</h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62914');">[<span id="p62914_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62914"><td width="1%" class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre></td><td class="code" id="p629code14"><pre class="php"><span style="color: #666666; font-style: italic;">/*
Plugin Name: RESTful Web Services
Plugin URI: http://mikeschinkel.com/wordpress/restful-web-services/
Description: This plugin enables REST-based API web services for WordPress.
Author: Mike Schinkel
Version: 0.1
Author URI: http://mikeschinkel.com/
*/</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RESTFUL_WEB_SERVICES_DIR'</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RESTFUL_WEB_SERVICES_URL_PATTERN'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'services(/?.*)?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$abspath</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'<span style="color: #000099; font-weight: bold;">\\</span>','</span><span style="color: #339933;">/</span><span style="color: #0000ff;">',ABSPATH),'</span><span style="color: #339933;">/</span><span style="color: #0000ff;">');
$rest_services_dir = str_replace('</span>\\<span style="color: #0000ff;">','</span><span style="color: #339933;">/</span><span style="color: #0000ff;">',RESTFUL_WEB_SERVICES_DIR);
$rest_services_path = trim(str_replace($abspath,'</span><span style="color: #0000ff;">',$rest_services_dir),'</span><span style="color: #339933;">/</span><span style="color: #0000ff;">');
define('</span>RESTFUL_WEB_SERVICES_PATH<span style="color: #0000ff;">', $rest_services_path);
&nbsp;
// NOTE, See: http://codex.wordpress.org/Custom_Queries#Permalinks_for_Custom_Archives
add_action('</span>init<span style="color: #0000ff;">', '</span>restful_web_services_flush_rewrite_rules<span style="color: #0000ff;">');
add_filter('</span>generate_rewrite_rules<span style="color: #0000ff;">', '</span>restful_web_services_add_rewrite_rules<span style="color: #0000ff;">');
add_action('</span>template_redirect<span style="color: #0000ff;">', '</span>restful_web_services_exec_service<span style="color: #0000ff;">');
&nbsp;
add_action('</span>init<span style="color: #0000ff;">', '</span>restful_web_services_flush_rewrite_rules<span style="color: #0000ff;">');
function restful_web_services_flush_rewrite_rules() {
 global $wp_rewrite;
 $wp_rewrite-&gt;flush_rules();
}
&nbsp;
add_filter('</span>generate_rewrite_rules<span style="color: #0000ff;">', '</span>restful_web_services_add_rewrite_rules<span style="color: #0000ff;">');
function restful_web_services_add_rewrite_rules( $wp_rewrite ) {
  $new_rules = array(
    RESTFUL_WEB_SERVICES_URL_PATTERN =&gt; null,
  );
  $wp_rewrite-&gt;rules = $new_rules + $wp_rewrite-&gt;rules;
}
&nbsp;
function restful_web_services_exec_service() {
  global $wp;
  if ($wp-&gt;matched_rule==RESTFUL_WEB_SERVICES_URL_PATTERN) {
    if ($wp-&gt;request == '</span>services<span style="color: #0000ff;">') {
      header('</span>Content<span style="color: #339933;">-</span>Type<span style="color: #339933;">:</span> text<span style="color: #339933;">/</span>plain<span style="color: #0000ff;">');
      print '</span>TODO<span style="color: #339933;">:</span> Generate a <span style="color: #990000;">list</span> of RESTful Web Services here <span style="color: #b1b100;">for</span> this WordPress Blog<span style="color: #339933;">.</span><span style="color: #0000ff;">';
    } else {
      list($dummy,$service_name) = explode('</span><span style="color: #339933;">/</span><span style="color: #0000ff;">',$wp-&gt;request);
      if (file_exists($service_php = (RESTFUL_WEB_SERVICES_DIR . '</span><span style="color: #339933;">/</span>services<span style="color: #339933;">/</span><span style="color: #0000ff;">' . $service_name . '</span><span style="color: #339933;">.</span>php<span style="color: #0000ff;">'))) {
        include_once $service_php;
      } else {
        header('</span>Content<span style="color: #339933;">-</span>Type<span style="color: #339933;">:</span> text<span style="color: #339933;">/</span>plain<span style="color: #0000ff;">');
        status_header(404);
        print '</span><span style="color: #cc66cc;">404</span> <span style="color: #339933;">-</span> Service not found<span style="color: #339933;">.</span><span style="color: #0000ff;">';
      }
    }
    exit;
  }
}
</span</pre></td></tr></table></div>

<p>You&#8217;ll note that my function &#8220;<em>restful_web_services_exec_service()</em>&#8221; is very bare-bones at the moment serving only a plain text message &#8220;<em>TODO:</em>&#8221; for the path <a href="http://example.com/services">http://example.com/services</a>, and assuming that any path <a href="http://example.com/services/{service">http://example.com/services/{service</a>} will execute a same-named .php file in the services subdirectory, i.e. for <a href="http://example.com/services/latest-post">http://example.com/services/latest-post</a> it will look for &#8220;<em>wp-content/plugins/restful-web-services/services/lastest-post.php</em>&#8221; and then delegate all the work to that .php file.</p>
<h3>wp-content/plugins/restful-services/services/latest-vidclip.php:</h3>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62915');">[<span id="p62915_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code15'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62915"><td width="1%" class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code" id="p629code15"><pre class="php"><span style="color: #666666; font-style: italic;">/*
Filename: latest-post.php
Service Name: Latest Post
*/</span>
<span style="color: #990000;">global</span> <span style="color: #000033;">$wp_query</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$post</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$file</span> <span style="color: #339933;">=</span> get_attached_file<span style="color: #009900;">&#40;</span><span style="color: #000033;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span> get_enclosed<span style="color: #009900;">&#40;</span><span style="color: #000033;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000033;">$charset</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: text/xml; charset='</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$link</span> <span style="color: #339933;">=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000033;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$html</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">&lt;&lt;</span>POST
<span style="color: #339933;">&lt;</span>?xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span> encoding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;$charset&quot;</span> version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>post id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{$post-&gt;ID}&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #000033;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>video<span style="color: #339933;">&gt;</span><span style="color: #000033;">$file</span><span style="color: #339933;">&lt;/</span>video<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>link<span style="color: #339933;">&gt;</span><span style="color: #000033;">$link</span><span style="color: #339933;">&lt;/</span>link<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;/</span>post<span style="color: #339933;">&gt;</span> 
POST<span style="color: #339933;">;</span>
<span style="color: #990000;">print</span> <span style="color: #000033;">$html</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Here is an example output returned by calling <a href="http://example.com/services/latest-post">http://example.com/services/latest-post</a>:</p>

<div id="wp_codebox_msgheader"><span class="right"><a href="javascript:;" onclick="toggle_collapse('p62916');">[<span id="p62916_symbol">-</span>]</a><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p629code16'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div id="wp_codebox"><table width="100%" ><tr id="p62916"><td width="1%" class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p629code16"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span> ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span> 
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;post</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;2&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Sample Post #1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/title<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;video<span style="font-weight: bold; color: black;">&gt;</span></span></span>http://videos example.org/video1.flv<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/video<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;link</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>http://example.org/sample-post-1/ 
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/post<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></td></tr></table></div>

<p>While bare-bones, that will meet my needs for the moment since I really only have the need for one service that responds to the HTTP GET verb. However, I can see where I might end up fleshing this out and create lots of helper functions that would streamline the creation of web services for RESTful access to the entirety of the WordPress database. If I do so I&#8217;ll be happy to donate this plugin to the community.&nbsp; In the mean time if you&#8217;d like to use this for your own use feel free but caveat emptor. However, if you&#8217;d like to use this code to create a plugin to contribute to the community, please contact me for collaboration.&nbsp; Of course if you&#8217;d like to retain me to fully flesh it out for you, I&#8217;m always open to that too! :-)</p>
<p>Finally, if anyone who knows the WordPress API better than I do can tell me where I erred in my analysis, and I really hope I did, please let me know so I can architect this thing better. On the other hand, if I was spot-on in my analysis maybe this will help the WordPress team understand what needs to be done so they can empower WordPress to generate any arbitrary content type without having to resort to hacks or bypassing the WordPress index.php startup code.&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/restful-web-services-in-wordpress-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Finding a WiFi Hot Spot in Atlanta</title>
		<link>http://mikeschinkel.com/blog/finding-a-wifi-hot-spot-in-atlanta/</link>
		<comments>http://mikeschinkel.com/blog/finding-a-wifi-hot-spot-in-atlanta/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 23:46:30 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Atlanta]]></category>

		<category><![CDATA[buckhead]]></category>

		<category><![CDATA[hotspot]]></category>

		<category><![CDATA[l5p]]></category>

		<category><![CDATA[marietta street]]></category>

		<category><![CDATA[midtown]]></category>

		<category><![CDATA[virgina-highlands]]></category>

		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/finding-a-wifi-hot-spot-in-atlanta/</guid>
		<description><![CDATA[Recently on Twitter&#160;I&#8217;ve had several people ask where they could find another good place for free WiFi in Atlanta.&#160; Each time I answered so I decided to maintain a page on my site with a list of the Atlanta WiFi Hot Spots I go to frequently or at least know about.
Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>Recently on <a target="_blank" href="http://twitter.com">Twitter</a>&nbsp;I&#8217;ve had several people ask where they could find another good place for free WiFi in Atlanta.&nbsp; <a target="_blank" href="http://twitter.com/MikeSchinkel/statuses/870821624">Each</a> <a target="_blank" href="http://twitter.com/MikeSchinkel/statuses/874645596">time</a> I answered so I decided to maintain a page on my site with a list of the <a href="/atlanta-wifi/">Atlanta WiFi Hot Spots</a> I go to frequently or at least know about.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/finding-a-wifi-hot-spot-in-atlanta/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FCKEditor&#8217;s ShowBlocks Feature ROCKS!</title>
		<link>http://mikeschinkel.com/blog/fckeditors-showblocks-feature-rocks/</link>
		<comments>http://mikeschinkel.com/blog/fckeditors-showblocks-feature-rocks/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:15:14 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[fckeditor]]></category>

		<category><![CDATA[showblocks joe banks]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/fckeditors-showblocks-feature-rocks/</guid>
		<description><![CDATA[
FCKeditor ShowBlocks Feature

The other day I wrote about how I was using Dean&#8217;s FCKeditor Plugin for Wordpress&#160;to solve the problems with WordPress&#8217; default TinyMCE editor eating my hand-coded HTML tags.&#160; Well Joe Banks left a great and detailed comment giving several tips including one about the ShowBlocks button. Unfortunately the default comment system in WordPress [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin: 0px 0px 1em 1em; text-align: center"><a title="Fullsize FCKeditor ShowBlocks Feature" target="_blank" href="/images/fckeditor.showblocks-feature.screenshot.gif"><img height="263" alt="FCKeditor ShowBlocks Feature" width="392" border="0" src="/images/fckeditor.showblocks-feature.screenshot.preview.gif" /></a></p>
<p class="caption" style="font-weight: bold; font-size: 0.75em; margin: 0px">FCKeditor ShowBlocks Feature</p>
</div>
<p>The other day I wrote about how I was using <a target="_blank" href="http://wordpress.org/extend/plugins/fckeditor-for-wordpress-plugin/">Dean&#8217;s FCKeditor Plugin for Wordpress</a>&nbsp;to solve the problems with WordPress&#8217; default TinyMCE editor <a target="_blank" href="/blog/fixing-wordpress-eating-of-html-div-tags/#comment-720">eating my hand-coded HTML tags</a>.&nbsp; Well <a target="_blank" href="http://joebanks.com/">Joe Banks</a> left <a target="_blank" href="http://mikeschinkel.com/blog/fixing-wordpress-eating-of-html-div-tags/#comment-720">a great and detailed comment</a> giving several tips including one about the ShowBlocks button. Unfortunately the default comment system in WordPress ate part of his comment so I couldn&#8217;t <em>see </em>what he was talking about and went exploring.&nbsp;</p>
<p>Well it turns out he was right; ShowBlocks <em>is awesome</em>!&nbsp; It shows the <strong><em>&lt;p&gt;</em></strong> tags,&nbsp;the <strong><em>&lt;div&gt; </em></strong>tags, and more. Check the screen shot above to see a larger version.</p>
<p>Joe Banks forgot to include <a title="Joe Bank's Blog" target="_blank" href="http://joebanks.com/">his blog URL</a> on his comment (or at least I think he forgot), but I was able to dig it up via a quick google.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/fckeditors-showblocks-feature-rocks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Atlanta Web Entrepreneurs learn Email Marketing</title>
		<link>http://mikeschinkel.com/blog/atlanta-email-marketing-july-2008/</link>
		<comments>http://mikeschinkel.com/blog/atlanta-email-marketing-july-2008/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 04:30:28 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Atlanta]]></category>

		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[ben chestnut]]></category>

		<category><![CDATA[email marketing]]></category>

		<category><![CDATA[events]]></category>

		<category><![CDATA[exact target]]></category>

		<category><![CDATA[isendyouremail]]></category>

		<category><![CDATA[mailchimp]]></category>

		<category><![CDATA[meetups]]></category>

		<category><![CDATA[people]]></category>

		<category><![CDATA[sandi solow]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/atlanta-web-entrepreneurs-july-2008/</guid>
		<description><![CDATA[
This month at the Atlanta Web Entrepreneurs meetup group I organize we hosted two sharp email marketing professionals: Sandi Karchmer Solow of I Send Your Email and Ben Chestnut, co-founder of Mail Chimp, a successful&#160;Atlanta-based Email Service Provider.&#160;Sandi&#160;presented Email Marking 101 to the group, and&#160;Ben regaled&#160;us with his&#160;story of how MailChimp came to be.

Sandi gave [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin: 1em"><a title="Ben Chestnut of MailChimp taking Q&amp;A by MikeSchinkel, on Flickr" href="http://www.flickr.com/photos/mikeschinkel/2679511020/"><img height="347" alt="Ben Chestnut of MailChimp taking Q&amp;A" width="500" src="http://farm4.static.flickr.com/3158/2679511020_e9c298c121.jpg" /></a></div>
<p><a target="_blank" href="http://web.meetup.com/32/calendar/8175669/">This month</a> at the <a target="_blank" href="http://atlanta-web.org/atlwebentrepreneurs">Atlanta Web Entrepreneurs</a> meetup group I organize we hosted two sharp email marketing professionals: <b><a target="_blank" href="http://isendyouremail.com/aboutus.aspx">Sandi Karchmer Solow</a></b> of <b><a target="_blank" href="http://isendyouremail.com/">I Send Your Email</a></b> and <b><a target="_blank" href="http://www.mailchimp.com/blog/">Ben Chestnut</a></b>, co-founder of <b><a target="_blank" href="http://www.mailchimp.com/">Mail Chimp</a></b>, a successful&nbsp;Atlanta-based Email Service Provider.&nbsp;Sandi&nbsp;presented <strong>Email Marking 101 </strong>to the group, and&nbsp;Ben regaled&nbsp;us with his&nbsp;story of how MailChimp came to be.</p>
<div style="float: left; margin: 1em"><a title="Sandi Solow on Email Marketing by MikeSchinkel, on Flickr" href="http://www.flickr.com/photos/mikeschinkel/2679511420/"><img height="177" alt="Sandi Solow on Email Marketing" width="240" src="http://farm4.static.flickr.com/3243/2679511420_18d1e62fa4_m.jpg" /></a></div>
<p>Sandi gave us a really great base level of overview of the email marketing landscape and explained how its critical to correctly opt-in your subscribers and to give them exactly what they asked for, and only what they asked for. Otherwise you loose trust and the fallout is worse than anything you could gain. <em>Oh, and Sandi was a real trooper to speak this month because she&#8217;s about seven month&#8217;s pregnant. So good luck to her and her soon-to-be-newborn.</em></p>
<p>As for MailChimp,&nbsp;evidently&nbsp;it&nbsp;was a side project&nbsp;that Ben and his partner&#8217;s web consulting company implemented to keep a client who wanted them to manage his email broadcast from hassling them, but they didn&#8217;t fully embrace it as their primary offering until many years later.&nbsp;And the month after they fully embraced it their revenue exceeded every prior month&#8217;s revenue they&#8217;d seen life-to-date for their business! Ben told us how MailChimp has a focus on simplicity and when we reviewing his prices we found MailChimp to be very price competitive, <strong>especially for email lists of less than 100 which they send for free!</strong></p>
<div style="float: right; margin: 1em"><a title="Details count! by MikeSchinkel, on Flickr" href="http://www.flickr.com/photos/mikeschinkel/2678692469/"><img height="157" alt="Details count!" width="240" src="http://farm4.static.flickr.com/3017/2678692469_1aae887548_m.jpg" /></a></div>
<p>Now most marketers have heard of <a target="_blank" rel="nofollow" href="http://exacttarget.com">ExactTarget</a> before but&nbsp;many may not have heard of <a target="_blank" href="http://mailchimp.com">MailChimp</a>, and based on MailChimp&#8217;s low pricing, it simple-to-use interface and its fun and irrerevent name, many people might think that MailChimp is only for businesses with tiny email lists. But most in the audience including myself were shocked to learn that they&nbsp;have&nbsp;successfully delivered some of the largest&nbsp;email broadcasts in the industry!&nbsp; Ben told us about a <em>major </em>software launch announcements where they sent out millions of of emails in just about 30 minutes! (Ben said the client asked never to be named but believe me, it was major!)</p>
<p>What was especially interesting was when member/attendee <a target="_blank" href="http://www.meetup.com/members/3176217/">Jason Prance</a> mentioned during Q&amp;A that he&#8217;d been using both MailChimp, for personal projects, and ExactTarget for a 100,000 name work mailing list, and that he loved the former and really disliked the latter. He then said if he had his druthers he&#8217;d be using MailChimp for work but couldn&#8217;t switch without re-opting in and loosing probably half his subscribers. To this Ben replied that all he&#8217;d need to do is provided his ExactTarget reports showing them being a responsible emailer and then he could easily move his 100k list to MailChimp.&nbsp;<em>Sold!</em></p>
<div style="margin-bottom: 1em" align="center"><a title="Email Marketing for Atlanta Web Entrepreneurs by MikeSchinkel, on Flickr" href="http://www.flickr.com/photos/mikeschinkel/2678692679/"><img height="201" alt="Email Marketing for Atlanta Web Entrepreneurs" width="500" src="http://farm4.static.flickr.com/3067/2678692679_5d4d047704.jpg" /></a></div>
<p>Anyhoo we had a great time, enjoyed learning about email marketing, and look forward to future Atlanta Web Entrepreneur meetups. Oh, and I <strong>want to thank both Sandi and Ben </strong>for taking the time to make such a memorable evening for us.&nbsp; It really is great to have such nice people who are willing to help their peers and who are offering such worldclass services so reasonably priced, all&nbsp;here in our hometown of <a target="_blank" href="http://en.wikipedia.org/wiki/Atlanta,_Georgia">Atlanta GA</a>. <strong>Go Atlanta!</strong></p>
<p>Visit Flickr to <a title="Email Marketing for Atlanta Web Entrepreneurs by MikeSchinkel, on Flickr" href="http://www.flickr.com/photos/mikeschinkel/sets/72157606231559578/">see all photos</a> I took for this event.</p>
<p><strong>P.S.:</strong> This was NOT a paid endorsement for MailChimp. We invited Ben to speak about MailChimp because one of our members that we really respect recommended him very highly. Plus Ben turned out to be a really great guy and there were actually several members in attendance who already use his service and love it. Evidently, MailChimp really kicks ass!</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/atlanta-email-marketing-july-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Intense Debate Error Message</title>
		<link>http://mikeschinkel.com/blog/intense-debate-error-message/</link>
		<comments>http://mikeschinkel.com/blog/intense-debate-error-message/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 18:11:33 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[error messages]]></category>

		<category><![CDATA[intense debate]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/intense-debate-error-message/</guid>
		<description><![CDATA[Gotta love this error message I got when trying to set a password that was &#34;too long&#34; on Intense Debate:

]]></description>
			<content:encoded><![CDATA[<p>Gotta love this error message I got when trying to set a password that was &quot;<em>too long</em>&quot; on Intense Debate:</p>
<div align="center"><img height="271" alt="" hspace="10" width="588" vspace="10" border="0" src="http://mikeschinkel.com/wp-content/uploads/intensedebate_error-message.GIF" /></div>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/intense-debate-error-message/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Will the Future bring Bluetooth Proximity Marketing?</title>
		<link>http://mikeschinkel.com/blog/bluetooth-proximity-marketing-future/</link>
		<comments>http://mikeschinkel.com/blog/bluetooth-proximity-marketing-future/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 15:54:18 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[bluetooth]]></category>

		<category><![CDATA[cell phones]]></category>

		<category><![CDATA[douglaskarr]]></category>

		<category><![CDATA[michaelkatz]]></category>

		<category><![CDATA[mobile devices]]></category>

		<category><![CDATA[proximity marketing]]></category>

		<category><![CDATA[value creation]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/bluetooth-proximity-marketing-future/</guid>
		<description><![CDATA[
Photo by Nemo&#8217;s great uncle

Several months back we had a meeting on Leveraging Mobile Apps for your Web-based Business at Atlanta Web Entrepreneurs&#160;and on the topic of mobile push marketing the consensus of the attendees was overwhelmingly &#8220;Don&#8217;t you even think about it, or I&#8217;ll end up ramming my mobile device far, far up someplace [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin: 0px 0px 1em 1em; text-align: center"><a title="Cell Phones OFF" target="_blank" href="http://flickr.com/photos/maynard/103774582/"><img style="margin: 0px" height="240" alt="Just Say NO to Bluetooth Proximity Marketing" width="180" border="0" src="http://mikeschinkel.com/wp-content/uploads/cell-phone_off.jpg" /></p>
<div class="caption" style="font-size: 0.75em; margin: 0px">Photo by Nemo&#8217;s great uncle</div>
<p></a></div>
<p>Several months back we had a meeting on <a target="_blank" href="http://web.meetup.com/32/calendar/7385326/">Leveraging Mobile Apps for your Web-based Business</a> at <a target="_blank" href="http://atlanta-web.org/atlwebentrepreneurs">Atlanta Web Entrepreneurs</a>&nbsp;and on the topic of mobile push marketing the consensus of the attendees was overwhelmingly &ldquo;<em>Don&rsquo;t you even think about it, or I&rsquo;ll end up ramming my mobile device far, far up someplace you&rsquo;d really it rather not be</em>.&rdquo; Or something like that. Soon after I made a comment on <a target="_blank" href="http://www.marketingtechblog.com/">Douglas Karr&#8217;s blog</a>&nbsp; on <a target="_blank" href="http://www.marketingtechblog.com/2008/03/31/bluetooth-proximity-marketing/">his post about bluetooth proximity marketing</a> saying exactly that.</p>
<p>Well I just noticed that <a target="_blank" href="http://admarktech.com/">Michael Katz of AdMarkTech.Com</a> posted a response entitled <a target="_blank" href="http://admarktech.com/2008/04/01/bluetooth-proximity-marketing-versus-television-advertising/">Do We Really Know What We Want?</a>&nbsp;where he takes the position that bluetooth proximity marketing is less intrusive that television advertising because when watching TV you are not &quot;<em>in the shopping zone.</em>&quot;&nbsp; He then posits that:</p>
<blockquote>
<p>&quot;<em>Maybe Bluetooth proximity marketing seems more intrusive than other forms of mainstream advertising because we&rsquo;re just not conditioned to be approached while we shop.</em>&quot;</p>
</blockquote>
<p>He then claims that (with emphasis mine):</p>
<blockquote>
<p>&nbsp;&quot;<em><strong>bona fide </strong></em>Bluetooth proximity marketing campaigns, similar to contextual vertical advertising platforms, are no different to television commercials&quot;</p>
</blockquote>
<p>And he summarizes&nbsp;with:</p>
<blockquote>
<p>&quot;<em>The capabilities of two way push, receiving surroundings based information, on-the-spot offers and the ability to instantly reject or to receive based on Bluetooth activation preference, Bluetooth proximity marketing is actually less intrusive and potentially more helpful than television advertising.</em>&quot;</p>
</blockquote>
<p>Maybe.&nbsp; But television advertising is not a fair comparison to bluetooth proximity advertising.&nbsp;First the TV viewer (or radio listener or magazine/newspaper reader or website viewer) makes a <strong>proactive choice to engage </strong>in a medium that they know is supported by advertising and that is part of an implicit pact where people gain content in exchange for attention. In the case of walking by a store, a person may or may not be in the frame of mind where they am ready to perform an attention exchange for an advertisement, and if they are not it is <em>highly </em>intrusive. Sure people could potentially be &quot;<em>conditioned</em>&quot; to accept it (shades of <a target="_blank" href="http://www.youtube.com/watch?v=d29mff8mEeo">Apple&#8217;s 1984 campaign</a>?) and he may be&nbsp;right,&nbsp;but I doubt it for the next reason.</p>
<p>There is a <strong>natural limit to advertising </strong>that can be inserted into content before people will no longer accept the exchange; only so much ad time on a TV or radio show, only so many square inches in a magazine or newspaper, and only so many square pixels close to valuable content available on a web page.&nbsp;&nbsp;In the case of bluetooth proximity marketing it&#8217;s likely a person walking down a mall will be <strong>inundated with ads</strong>; literally tens if not hundreds in a short period, and that is far more than anyone can process.</p>
<p>In my opinion that&#8217;s a major reason <strong>why people hate email spam</strong>; that it overwhelms them. If we&nbsp;could somehow configure the number of commercial emails we&#8217;d get per day, and we could have them filtered by our preferences I think we&#8217;d be happy to get &quot;unsolicited<em>&quot;</em> commercial email. But there is <strong>no moderation on on spam</strong>, and without moderation on bluetooth proximity marketing it will just be another form of spam, only even more offensive because the devices are smaller.</p>
<p>Can there be<strong> moderation on bluetooth proximity marketing?</strong>&nbsp; Ads on TV and radio, for example, come in&nbsp;series. Bluetooth proximity marketing would comes in&nbsp;parallel as does spam, and with nothing&nbsp;to moderate it. One possible way to moderate would be for governments to set up <strong>regulatory agencies</strong> to manage and meter access to said marketing but that sounds like a cure worse than the disease. Another potential way would be <strong>gatekeeping companies&nbsp;</strong>to control who can broadcast bluetooth proximity marketing messages to their subscribers and who cannot, and people would subscribe based on who does&nbsp;the best job of filtering. But I think a lot of visionary people in very powerful and competing positions would have to come together to make such a network of gatekeeper possible, and <strong>I just don&#8217;t see it happening</strong>.</p>
<p>Bluetooth proximity marketing is a typical example of how most people spend <strong>too much time on what they want</strong> and <strong>too little time creating value</strong>. Michael&#8217;s post title (<em>Do We Really Know What We Want?)&nbsp;</em>is a great example of that.&nbsp; It sounds to me that Michael is asking &quot;<em>How can we convince people to want what we want?</em>&quot; That is wrong-headed, we should instead be thinking &quot;<em>What do they want, and how can we make a business to give it to them?</em>&quot;</p>
<p>Here&#8217;s a product I know people will <em>really </em>want instead; something that <strong>blocks all&nbsp;bluetooth proximity ads </strong>from ever reaching their mobile device.&nbsp; Now <em>that</em> is a product of tomorrow that will be in <strong>VERY HIGH demand</strong>!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/bluetooth-proximity-marketing-future/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twitter URL = Uniform Person Locator (UPL)?</title>
		<link>http://mikeschinkel.com/blog/twitter-upl/</link>
		<comments>http://mikeschinkel.com/blog/twitter-upl/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:20:56 +0000</pubDate>
		<dc:creator>MikeSchinkel</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Opinion]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[davidscohen]]></category>

		<category><![CDATA[identifiers]]></category>

		<category><![CDATA[locators]]></category>

		<category><![CDATA[people]]></category>

		<category><![CDATA[personal branding]]></category>

		<category><![CDATA[sociology]]></category>

		<category><![CDATA[twitter]]></category>

		<category><![CDATA[uniform person locators]]></category>

		<category><![CDATA[upl]]></category>

		<category><![CDATA[url]]></category>

		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://mikeschinkel.com/blog/twitter-url-universal-person-locator-upl/</guid>
		<description><![CDATA[I tried Twitter a year ago and either couldn&#8217;t &#34;get it&#34; back then, or I was just mentally, philisophically&#160;or logicistically in&#160;the wrong place to appreciate it. But I recently started Tweeting and all of a sudden I am seeing real value in it and am also seeing how so many others who still are not [...]]]></description>
			<content:encoded><![CDATA[<p><img height="167" alt="Uniform Person Locator" hspace="10" width="388" align="right" vspace="10" border="0" src="/images/uniform-person-locator.letters.gif" />I tried <a target="_blank" href="http://twitter.com">Twitter</a> a year ago and either couldn&#8217;t &quot;<em>get it</em>&quot; back then, or I was just mentally, philisophically&nbsp;or logicistically in&nbsp;the wrong place to appreciate it. But I recently started Tweeting and all of a sudden I am seeing real value in it and am also seeing how so many others who still are not using it could see value in it too!.&nbsp;And to slightly paraphrase an old saw, &quot;<em>There are none so evangelical as the recently converted&#8230;&quot;</em>&nbsp;&nbsp; ;-)</p>
<p>But rather than blog my full thoughts on Twitter right now I just want to ponder the following; if a web page can have a URL a.k.a. Uniform Resource Locator (or for <a target="_blank" href="http://www.w3.org/">w3c</a> purists, a <a target="_blank" href="http://www.w3.org/Addressing/">URI</a>),&nbsp;shouldn&#8217;t we establish a <strong>Uniform Person Locators</strong>, for people, or &quot;<em>UPLs</em>&quot; for short?&nbsp;</p>
<p>I&#8217;ve actually pondered this question numerous times in the past as I contemplated one of my many <a target="_blank" href="http://atlanta-web.org">web entrepreneurial</a> ideas.&nbsp; In one context I&#8217;m lucky; there are very, very few people in this world whose name is &quot;<em>Mike Schinkel&quot;</em>, and the few I&#8217;m aware of are not at all active on the web so I pretty much &quot;own&quot; the &quot;<em>MikeSchinkel</em>&quot; as my uniform person <em>identifier.&nbsp; </em>I&#8217;ve so blanked the use of &quot;<em>MikeSchinkel</em>&quot; on the web that there is little change of anyone else actually wanting to use it lest they be confused with me (that is, unless they wanted to create that confusion. But <em>that </em>is another subject.)</p>
<p>But what about my friend <a target="_blank" href="http://www.davidcohen.com/">David Cohen</a>?&nbsp; From him I understand that he has the opposite situation.&nbsp; For him <a target="_blank" href="http://www.drexel.edu/law/david-cohen.asp">there</a> <a target="_blank" href="http://www.variety.com/index.asp?layout=bio&amp;peopleID=1517">are</a> <a target="_blank" href="http://www.wilmerhale.com/David_Cohen/">hundreds</a> <a target="_blank" href="http://www.dscohen.com/">if</a> <a target="_blank" href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&amp;friendid=11543130">not</a> <a target="_blank" href="http://www.techstars.org/mentors/dcohen/">thousands</a> <a target="_blank" href="http://www-personal.umich.edu/~dkcohen/">of</a> <a target="_blank" href="http://maven.smith.edu/~dwcohen/">other</a> <a target="_blank" href="http://en.wikipedia.org/wiki/David_X._Cohen">David</a> <a target="_blank" href="http://www.dscohen.com/">Cohen</a>s (to link but a few.) Poor guy; how does he get his name known for being <em>him</em>? But I digress.</p>
<p>Yes we can all have our own domain names, like I have <a href="http://mikeschinkel.com/">http://mikeschinkel.com</a> and my friend has <a href="http://davidcohen.com/">http://davidcohen.com</a> (can you believe he got that domain, with all that competition?!?), but so many people don&#8217;t have their own domain and for some people it takes more knowledge or effort then they are willing or able to invest.&nbsp;On the other hand getting a Twitter account is free to create and free to maintain and only requires 5 minutes and then occasional access to an Internet-connected&nbsp;computer which in the USA and most non-3rd world countries&nbsp;can be had at the library or an Internet cafe. Once a twitter account is created, that&#8217;s it; no one else can stake that claim.&nbsp;</p>
<p>Now, thanks to some rather saavy engineers at Twitter and the brilliance of the underlying technology of the web (i.e. the URL) we now have what could potentially become the <em>Uniform Person Locator</em>, at least within the subset of people are active on the web.&nbsp; With someone&#8217;s Twitter URL you have a direct way to &quot;<em>locate</em>&quot; them. Minimally you can follow their updates, but for most Twitter users you can relatively easily contact them; just tweet them and most will reply. <strong>Just as importantly</strong> you can use someone&#8217;s Twitter user name and unambiguously refer to them by that unique identifier which behaves for people just like URLs behave for &quot;<em>resources</em>&quot; (i.e. web pages, PDF files, graphic files, .ZIP&nbsp;files, etc.)</p>
<p>Will Twitter ever make it&#8217;s way to effectively being the &quot;<em>Uniform Person Locator</em>.&quot;&nbsp; Probably not for all people, but at least for the subset of people on Twitter, it is a really interesting piece of infrastructure to consider.&nbsp; <strong>And if you don&#8217;t yet have a Twitter account, now&#8217;s the time to get one.</strong></p>
<p>P.S. So can you guess my Twitter user name?&nbsp; &quot;<em><a target="_blank" href="http://twitter.com/MikeSchinkel">MikeSchinkel</a></em>&quot;, of course.&nbsp;&nbsp; David Cohen&#8217;s Twitter user name?&nbsp; &quot;<em><a target="_blank" href="http://twitter.com/davidscohen">davidscohen</a></em>&quot;; Unlike with his domain name, &quot;<em><a target="_blank" href="http://twitter.com/davidcohen/">davidcohen</a></em>&quot; had already been taken on Twitter (by a duffus that&#8217;s not even using it!) before my friend David Cohen could grab it. Ah, such is life when resources are scarce.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeschinkel.com/blog/twitter-upl/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
