<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Chris Fay &#38; Jennie Fay's Webportal</title>
	<atom:link href="http://www.cjfay.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cjfay.com</link>
	<description>Words on a platter just to get you wet...</description>
	<pubDate>Fri, 07 Nov 2008 22:57:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Parsing mal-formed rss feeds with Magpie RSS</title>
		<link>http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/</link>
		<comments>http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 01:03:08 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=108</guid>
		<description><![CDATA[I recently discovered that Craigslist&#8217;s rss feeds leave much to be desired in terms of well formed xml. A large portion of the AdRavage back-end magic works by parsing the rss results of searches, and the bulk of this is achieved through Magpie RSS. Unfortunately, when returned feeds contain invalid encoding or have structural issues [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span> recently discovered that Craigslist&#8217;s rss feeds leave much to be desired in terms of well formed xml. A large portion of the AdRavage back-end magic works by parsing the rss results of searches, and the bulk of this is achieved through Magpie RSS. Unfortunately, when returned feeds contain invalid encoding or have structural issues they become virtually impossible to parse - at least by default.</p>
<p>Fortunately one of my users created a search that returned parsing errors of this nature and allowed me to dive into a solution to this problem. First of all, considering Craigslist will not be modifying the user input mechanism used to builds its feeds, and certainly will ignore my request for better formatting, i took it apon myself to do a little research. By submitting the feed for validation on http://validator.w3.org/feed I was able to get the exact issue causing the feed to break:</p>
<p><a href="http://www.cjfay.com/wp-content/uploads/2008/10/feederror.png"><img class="size-medium wp-image-109 alignleft" title="feederror" src="http://www.cjfay.com/wp-content/uploads/2008/10/feederror-300x64.png" alt="" width="297" height="64" /></a></p>
<p>I couldn&#8217;t tell exactly what the issue was (aside from <em>&#8216;not well-formed (invalid token)</em>&#8216;) until I pasted the contents into Notepad++, which displayed a strangely encoded character within the string. To fix the issue I needed to cleanse the extracted RSS feed just before it gets passed to PHP&#8217;s xml_parser, and after tracing the execution back I was able to pin-point it within rss_parse.inc right around line 130 or so.</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000033;">$status</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xml_parse</span><span style="color: #009900;">&#40;</span> <span style="color: #000033;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>parser<span style="color: #339933;">,</span> <span style="color: #000033;">$source</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The contents of $source is the data within the rss feed and the point just before the parsing is conducted. The solution was simple - str_replace() the contents of $source before passing it to the parser.</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> MagpieRSS <span style="color: #009900;">&#40;</span><span style="color: #000033;">$source</span><span style="color: #339933;">,</span> <span style="color: #000033;">$output_encoding</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ISO-8859-1'</span><span style="color: #339933;">,</span>
                        <span style="color: #000033;">$input_encoding</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000033;">$detect_encoding</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">/*
		 * Feed cleansing (encoding replacement stuff) here CLF - 10/25/2008
		 * Should execute it on $source (the content extracted from feed)
		 */</span>	
&nbsp;
		 <span style="color: #000033;">$source</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'[bad data]'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000033;">$source</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		 <span style="color: #666666; font-style: italic;">/*
		  * END - feed cleansing
		  */</span>
&nbsp;
<span style="color: #339933;">...</span></pre></div></div>

<p>I wasn&#8217;t able to show the actual character I needed to replace, but you get the idea - replace [bad char] with the character(s) you want to remove before parsing. If you can&#8217;t seem to find it try pasting the section of bad data into Notepad++ and it will display it for you - notepad and wordpad will not. Invalid encoding/chars is only one way that feeds can be mal-formed, so if you run into other problems you would need to modify $source accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AdRavage.com - Ad search automation</title>
		<link>http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/</link>
		<comments>http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 23:01:01 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=102</guid>
		<description><![CDATA[AdRavage.com is released!
As some of you already know, I’ve been working on a site that lets you automate searching on websites such as Craigslist. I recently needed to purchase a vehicle and was repeatedly beaten to the punch by others who were able to monitor the ads much closer than I. AdRavage lets you create [...]]]></description>
			<content:encoded><![CDATA[<p><a title="AdRavage.com" href="http://adravage.com" target="_blank"><span class="drop">A</span>dRavage.com</a> is released!</p>
<p class="MsoNormal">As some of you already know, I’ve been working on a site that lets you automate searching on websites such as Craigslist. I recently needed to purchase a vehicle and was repeatedly beaten to the punch by others who were able to monitor the ads much closer than I. AdRavage lets you create search terms, how often to search those terms, and ultimately sends out emails and/or text messages when matching results are found. <span> </span>The site is in beta as of now, and will soon feature other websites besides Craigslist.</p>
<p class="MsoNormal">Check it out! <a title="AdRavage.com" href="http://adravage.com">http://adravage.com</a></p>
<p class="MsoNormal"><a href="http://www.cjfay.com/wp-content/uploads/2008/10/adravage2.png"><img class="alignleft size-medium wp-image-104" title="adravage2" src="http://www.cjfay.com/wp-content/uploads/2008/10/adravage2-300x189.png" alt="" width="300" height="189" /></a></p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal"><a href="http://www.cjfay.com/wp-content/uploads/2008/10/adravage.jpg"><img class="alignleft size-medium wp-image-103" title="adravage" src="http://www.cjfay.com/wp-content/uploads/2008/10/adravage-300x206.jpg" alt="" width="300" height="206" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress HowTo - Fix missing category information</title>
		<link>http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/</link>
		<comments>http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 18:01:20 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=83</guid>
		<description><![CDATA[I recently found that somehow a large number of my posts where completely missing from wp_term_relationships, which is responsible for mapping posts to their appropriate categories in version 2.6.1.
I think this happened after upgrading a few versions back, but had never actively used categories until now. All of my posts should have been uncategorized by [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span> recently found that somehow a large number of my posts where completely missing from wp_term_relationships, which is responsible for mapping posts to their appropriate categories in version 2.6.1.</p>
<p>I think this happened after upgrading a few versions back, but had never actively used categories until now. All of my posts should have been uncategorized by default, but for some reason a huge number of them simply did not have a corresponding record in wp_term_relationships and as a result were drifting along in non-categorized (not in the default category &#8216;uncategorized&#8217; mind you) purgatory.</p>
<p>Rather than sift through each and every post to see if it has an entry in the table, the script below will</p>
<ol>
<li>Loop through every post and check if post id exists in wp_term_relationships table</li>
<li>If the post id does have a corresponding object id in wp_term_relationships its skipped</li>
<li>If the post id does <strong>not</strong> have a corresponding object id in table then add an entry using defined CATEGORYID</li>
</ol>
<p>Make sure that you define a valid CATEGORYID in the script (default is 1). Look in the table wp_terms and find the term_id for the category you want each missing post to have, then set CATEGORYID appropriately.</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
 * cleanseWordpressPosts.php
 * Script used to re-insert posts information missing in wp_term_relationships to fix category issues
 * Written by: Chris Fay
 *9/15/2008
 *
 * To Use: First backup your database!
 * Copy the contents of this script to a file called updateCat.php
 * Upload updateCat.php to your web server
 * Verify the script is set to run in test mode first to see what data would be inserted
 * Browse to the script on the web server
 * Change testmode to false to allow script to update database   
 */</span>
&nbsp;
<span style="color: #000033;">$dbhost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'hostname'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//usually localhost</span>
<span style="color: #000033;">$dbuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbUserNameHere'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbUserNameHere with your username</span>
<span style="color: #000033;">$dbpass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbPasswordHere'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbPasswordHere with your user's password</span>
<span style="color: #000033;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbName'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbName with the database name you want to connect to</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TESTMODE'</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: #666666; font-style: italic;">//leave true to get information on what would be updated - the database</span>
						  <span style="color: #666666; font-style: italic;">//will not be touched if set to true - change to false to allow the script to modify the datbase</span>
<span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CATEGORYID'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//the category id you would like all posts missing category info to have</span>
&nbsp;
<span style="color: #000033;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$dbhost</span><span style="color: #339933;">,</span> <span style="color: #000033;">$dbuser</span><span style="color: #339933;">,</span> <span style="color: #000033;">$dbpass</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span>                      <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error connecting to mysql'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$dbname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//loop through each record, cleanse it, then re-insert it</span>
<span style="color: #000033;">$query</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT id FROM wp_posts&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$query2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT object_id FROM wp_term_relationships&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$totalUpdates</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000033;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query</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>TESTMODE<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;**** TEST MODE: No data will be modified in your database ****&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$result</span><span style="color: #339933;">,</span> MYSQL_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>	
	<span style="color: #000033;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Checking id: $id&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>	
	<span style="color: #000033;">$match</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>	
	<span style="color: #000033;">$result2</span> <span style="color: #339933;">=</span>  <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$row2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$result2</span><span style="color: #339933;">,</span> MYSQL_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$id</span> <span style="color: #339933;">===</span> <span style="color: #000033;">$row2</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'object_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>					
		<span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Found match for id: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000033;">$id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - skipping. &lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000033;">$match</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">//no need to keep looping through since an item already exists</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>						
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>  
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000033;">$match</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;No match found for id: &quot;</span><span style="color: #339933;">.</span> <span style="color: #000033;">$id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - processing new category information&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000033;">$totalUpdates</span><span style="color: #339933;">++;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>TESTMODE<span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000033;">$query3</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT into wp_term_relationships VALUES ($id,&quot;</span><span style="color: #339933;">.</span>CATEGORYID<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;,0)&quot;</span><span style="color: #339933;">;</span>	  	
			<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;The insert query we'd be using:&lt;br /&gt; $query3&lt;br /&gt;&lt;br /&gt;&quot;</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;">//update wp_term_relationships with missing id info</span>
			<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Creating category info for ID: $id. &lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000033;">$query3</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT into wp_term_relationships VALUES ($id,&quot;</span><span style="color: #339933;">.</span>CATEGORYID<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;5,0)&quot;</span><span style="color: #339933;">;</span>	  					
			<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query3</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error, insert query failed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Category info updated successfully&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>	    				
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">//end while</span>
&nbsp;
<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Total updates: &lt;strong&gt;$totalUpdates&lt;/strong&gt; &lt;br/&gt;All finished...&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#124;&#124;~~ pirates of the of caribernetz ~~&#124;&#124;</title>
		<link>http://www.cjfay.com/2008/08/21/pirates-of-the-of-caribernetz/</link>
		<comments>http://www.cjfay.com/2008/08/21/pirates-of-the-of-caribernetz/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 21:38:10 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

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

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=80</guid>
		<description><![CDATA[Copyright holders/Big business/Governments (NWO) say…
ALL YOUR FREEDOMS ARE BELONG TO US!!!!!
We the people say “Over our dead bodies!!”
NWO replies ” Ok fine with us”
And police forces all around the globe light the night with tasered bodies EVERYWHERE.
WTB the ultimate undeniably inevitable collapse of this FARCE of a world society in which the cornerstone of its [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">C</span>opyright holders/Big business/Governments (NWO) say…<br />
ALL YOUR FREEDOMS ARE BELONG TO US!!!!!</p>
<p>We the people say “Over our dead bodies!!”</p>
<p>NWO replies ” Ok fine with us”</p>
<p>And police forces all around the globe light the night with tasered bodies EVERYWHERE.</p>
<p><strong>WTB</strong> the ultimate undeniably inevitable collapse of this FARCE of a world society in which the cornerstone of its foundation is the way of get/greed once and for all plz. And no,I don’t want any fucking fries with that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/08/21/pirates-of-the-of-caribernetz/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scooting off into the sunset</title>
		<link>http://www.cjfay.com/2008/07/14/scooting-off-into-the-sunset/</link>
		<comments>http://www.cjfay.com/2008/07/14/scooting-off-into-the-sunset/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 21:19:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=78</guid>
		<description><![CDATA[In an attempt to thwart the rising gas prices I have made a decision that will inevitably decrease both our fuel costs as well as every last ounce of manhood I possess (of which I had much)- my new mode of transportation will soon be a scooter. Not just any scooter, but a 125CC beast [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span>n an attempt to thwart the rising gas prices I have made a decision that will inevitably decrease both our fuel costs as well as every last ounce of manhood I possess (of which I had much)- my new mode of transportation will soon be a scooter. Not just any scooter, but a 125CC beast aptly named &#8216;Buddy&#8217; from Genuine Scooters. Laughing are you? Well keep it up - with a max speed of 65mph it may not win the race, but after factoring in the ridiculous 100mpg I&#8217;ll be able to sleep at night.</p>
<div id="bpHomeImage">
<img src="http://cjfay.com/images/scooter.jpg" />
</div>
<p>Going from a Suzuki gsxr 600 to a 125CC scooter will surely be demoralizing - as will be the glares I receive on the road to work in the morning - but I&#8217;m left with no choice and ultimately find it a better option than buying a second gas gusler.</p>
<p>A message to those driving in the KC area: please don&#8217;t kill the little guy on the red scooter, he will haunt you in your sleep. </p>
<div class="clear"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/07/14/scooting-off-into-the-sunset/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I eat boxes for breakfast</title>
		<link>http://www.cjfay.com/2008/06/30/i-eat-boxes-for-breakfast/</link>
		<comments>http://www.cjfay.com/2008/06/30/i-eat-boxes-for-breakfast/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 14:29:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=73</guid>
		<description><![CDATA[After what seemed like the longest weekend of my entire life - packing, loading, moving, unloading, unpacking, sleeping - we have reached probably 80% completion on our move. Sure, there are still a few boxes glaring at us from each bedroom, our garage is still coated with boxes of Christmas past, but at least we [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span>fter what seemed like the longest weekend of my entire life - packing, loading, moving, unloading, unpacking, sleeping - we have reached probably 80% completion on our move. Sure, there are still a few boxes glaring at us from each bedroom, our garage is still coated with boxes of Christmas past, but at least we can see the floor in our kitchen - and oh how nice the floor is.</p>
<p>I was a bit worried about our appliances though, considering neither Jennie nor I thought to measure the space (the fridge already in there was frick&#8217;n huge!), and fortunately most of them went in without a hitch - that is except the fridge. Fortunately for us, and less than fortunately for dad, the trim and a bit of the counter top was all that need to be modded for it to slide gleefully into its final resting place. Dad, you&#8217;re an Egyptian magician.</p>
<p>I&#8217;ll leave you with this picture of us, post unload into the new house, and I think Jennie&#8217;s stance says it all&#8230;</p>
<p><img class="bpImage" src="http://cjfay.com/images/moveShrunk.jpg" alt="Jennie and I post move, yeah baby..." /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/06/30/i-eat-boxes-for-breakfast/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Houses are glorious </title>
		<link>http://www.cjfay.com/2008/06/27/houses-are-glorious/</link>
		<comments>http://www.cjfay.com/2008/06/27/houses-are-glorious/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 20:06:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

		<guid isPermaLink="false">http://www.cjfay.com/?p=72</guid>
		<description><![CDATA[Today marks a day to go down in Chris &#038; Jennie Fay history - we officially closed on our new house! It was a long and marginally painful process, but in the end we landed a great house in a great area, and I couldn&#8217;t be more excited to ditch apartment living. We were so [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">T</span>oday marks a day to go down in Chris &#038; Jennie Fay history - we officially closed on our new house! It was a long and marginally painful process, but in the end we landed a great house in a great area, and I couldn&#8217;t be more excited to ditch apartment living. We were so excited that we decided to blow a heap of gas carting various items to and fro in lieu of the truck we have rented tomorrow - whatever, we do what we want.</p>
<p>With Hayden growing older and a new baby on the way it became evident that the apartment lifestyle, as wonderful as it were in my bachelor and early marriage years, was simply not going to cut it for us Fay&#8217;s. After a few weeks of digging, searching, looking, complaining, searching, hopelessness, and more searching we finally found a house a block away from the house I grew up in before moving to AZ. I can see my old elementary school from the front porch (not sure if that&#8217;s a good or bad thing), and all in all I&#8217;m looking forward to the transition - though I&#8217;m not excited about the additional dollar dollar bills I&#8217;ll have to throw down. We&#8217;ll have some pictures up soon I&#8217;m sure&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/06/27/houses-are-glorious/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fix odd characters in Wordpress posts</title>
		<link>http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/</link>
		<comments>http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 02:48:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

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

		<guid isPermaLink="false">http://www.cjfay.com/?p=71</guid>
		<description><![CDATA[I noticed recently that my Wordpress data had some funky characters in almost every post:
Examples:
ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢
ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Â¦
After browsing through the posts it looks like those characters represent things like quotations, dashes and double periods. I read through various forums that said this is caused due to the encoding and collation, however after following the recommendations of sites [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span> noticed recently that my Wordpress data had some funky characters in almost every post:</p>
<p>Examples:</p>
<p>ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢<br />
ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Â¦</p>
<p>After browsing through the posts it looks like those characters represent things like quotations, dashes and double periods. I read through various forums that said this is caused due to the encoding and collation, however after following the recommendations of sites like <a href="http://www.mydigitallife.info/2007/06/18/wordpress-charset-encoding-problem-after-upgrading-to-version-22/" target="_blank">http://www.mydigitallife.info/2007/0&#8230;to-version-22/</a> I was still unable to get rid of the huge amount of garbled characters. Ultimately, I spent some time mapping each set of characters to the appropriate one (quotes, commas, etc&#8230;) and built a php script to basically:</p>
<p>1. Loop through every post in the Wordpress database<br />
2. Find and replace all the garbled characters<br />
3. Re-insert the data</p>
<p>I have attached the script below (very simple) in case others find this the only way to cleanse out this character issue. One other thing I should mention - this only works if the garbled characters are actually garbled in the database - if the issue is simply how your browser is rendering the text, and not how the strings are actually stored in the database, then this wont help you. Although feel free to give it a shot.</p>
<p>One other thing - you may need to add additional characters to replace in the script. It should be self explanatory how based on what I have presented already. If you need help. simply post in here.</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
 * cleanseWordpressPosts.php
 * Script used to replace various characters displayed in posts with appropriate values
 * Written by: Chris Fay
 * 6/14/2008
 *
 * To Use: First backup your database!
 * Run the script in test mode to see what data would be cleansed
 * Change testmode to false to allow script to cleanse database 
 *
 * If you need other characters clensed then simply duplicte one of the lines that look like:
 *
 * $cleansed = str_replace(&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“&quot;, &quot;&quot;, $cleansed, $count4); 
 *
 * .. and if using the example above replace the ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“ with the string you want to replace
 * and inside the double quotes add the value you want to replace with. 
 */</span>
&nbsp;
<span style="color: #000033;">$dbhost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$dbuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbUserNameHere'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbUserNameHere with your username</span>
<span style="color: #000033;">$dbpass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbPasswordHere'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbPasswordHere with your user's password</span>
<span style="color: #000033;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'dbNam'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//replace dbName with the database name you want to connect to</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TESTMODE'</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: #666666; font-style: italic;">//leave true to get information on what would be updated - the database</span>
						  <span style="color: #666666; font-style: italic;">//will not be touched if set to true - change to false to allow the script to modify the datbase</span>
&nbsp;
<span style="color: #000033;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$dbhost</span><span style="color: #339933;">,</span> <span style="color: #000033;">$dbuser</span><span style="color: #339933;">,</span> <span style="color: #000033;">$dbpass</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span>                      <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error connecting to mysql'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$dbname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//loop through each record, cleanse it, then re-insert it</span>
<span style="color: #000033;">$query</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT id, post_content FROM wp_posts&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000033;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query</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>TESTMODE<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;**** TEST MODE: No data will be modified in your database ****&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$result</span><span style="color: #339933;">,</span> MYSQL_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>	
	<span style="color: #000033;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$unclensed</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_content'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Cleansing id: $id&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>	
&nbsp;
    <span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$unclensed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã¢â‚¬Å¡Ãƒ&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 		
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Â¦&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Ãƒâ€¦Ã¢â‚¬Å“&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Ãƒâ€¹Ã…â€œ&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Â¦Â¦&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Â¦&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count11</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000033;">$cleansed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â€šÂ¬Ã‚&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000033;">$cleansed</span><span style="color: #339933;">,</span> <span style="color: #000033;">$count12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000033;">$escaped</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$cleansed</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>TESTMODE<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;ID: $id would have been cleansed. &lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Cleanse count for each string:&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢: $count1&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã¢â‚¬Å¡Ãƒ: $count2&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬: $count3&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“: $count4&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Â¦: $count5&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢: $count6&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢: $count7&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;Ãƒâ€¦Ã¢â‚¬Å“: $count8&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;Ãƒâ€¹Ã…â€œ: $count9&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;Â¦Â¦: $count10&lt;br /&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;Â¦: $count11&lt;br /&gt;&quot;</span>					  
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;ÃƒÂ¢Ã¢â€šÂ¬Ã‚: $count12&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000033;">$query2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;update wp_posts set post_content = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000033;">$escaped</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' where id = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000033;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>	  	
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;The insert query we'd be using:&lt;br /&gt; $query2&lt;br /&gt;&lt;br /&gt;&quot;</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: #990000;">echo</span> <span style="color: #0000ff;">&quot;ID: $id clensed. &lt;br&gt;&quot;</span>
			<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;Inserting data into table&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000033;">$query2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;update wp_posts set post_content = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000033;">$escaped</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' where id = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000033;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>	  	
		<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$query2</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error, insert query failed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;Post cleansed and updated&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>	    
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">//end while</span>
&nbsp;
<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;All finished...&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Return of the Floaters</title>
		<link>http://www.cjfay.com/2008/04/08/return-of-the-floaters/</link>
		<comments>http://www.cjfay.com/2008/04/08/return-of-the-floaters/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 19:06:20 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

		<guid isPermaLink="false">/?p=62</guid>
		<description><![CDATA[As you are now reading this blog it is apparent that yes, I survived the perils of the Buffalo River. Our minds, bodies, and spirits were brutally tested by the forces of evil, ultimately succeeding fruitfully on the wings of wholesome Jerky Boy&#8217;s humor and jerky beef tumors. (what) &#160;&#160;
I was not however, spared from [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span>s you are now reading this blog it is apparent that yes, I survived the perils of the Buffalo River. Our minds, bodies, and spirits were brutally tested by the forces of evil, ultimately succeeding fruitfully on the wings of wholesome Jerky Boy&rsquo;s humor and jerky beef tumors. (what) &nbsp;&nbsp;</p>
<p>I was not however, spared from a frigid dip in said river. We had come so far - almost the entire trip had blissfully passed without so much as an innocent splash of river warf on our clothes and inside our canoe. We had become uber men, quasi canoe super beasts, ready to battle any and all rapids that mother earth could toss our direction. It was in the peak of our vainglorious narcissism that she catapulted the head of our man canoe into a stump, then our glorious tail into yet another stump. In less than 10 seconds we were sunk, bobbing down the river in 40 degree water, clutching to the canoe, a wetbag, and our dignity.&nbsp;</p>
<p>After finally escaping the clutches of the river we had so dominated earlier, our frustration was quickly replaced by yet another realization that our pullout was less than a mile down river. Not only had we capsized, but we did so in the final stretch of the 24 mile trip. Oh how close we came to total domination &ndash; congrats to G&amp;B for achieving such canoe mastery and avoiding a fate of humiliation and <i>noob</i>itude.&nbsp;</p>
<p>For a more visual representation of the trip see our home page for pics and the videos section for some live footage of the debauchery.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/04/08/return-of-the-floaters/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Floaters</title>
		<link>http://www.cjfay.com/2008/04/03/floaters/</link>
		<comments>http://www.cjfay.com/2008/04/03/floaters/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 21:43:48 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
		
		<category><![CDATA[Babbling]]></category>

		<guid isPermaLink="false">/?p=59</guid>
		<description><![CDATA[Laughter, dirty river water, canoes, cheesy one liner&#8217;s, beef jerky, cold weather, spandex, pink fanny packs, beer, and ticks.&#160;
All of these magical components bundle together in order to serve one higher purpose &#8211; canoe trippage. That&#8217;s right - I&#8217;m embarking on a mystical journey with three other primates into the nefarious jungle in order to [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">L</span>aughter, dirty river water, canoes, cheesy one liner&rsquo;s, beef jerky, cold weather, spandex, pink fanny packs, beer, and ticks.&nbsp;</p>
<p>All of these magical components bundle together in order to serve one higher purpose &ndash; canoe trippage. That&rsquo;s right - I&rsquo;m embarking on a mystical journey with three other primates into the nefarious jungle in order to heed the man yell grumbling deep within us all. Or, if you&rsquo;re like me, you got suckered into the idea that floating down a river would clench your burning desire to escape reality for one small moment.&nbsp;</p>
<p>My original disposition was inaccurate after realizing that death is surely imminent &ndash; the river has flooded and we will surely peril under its mighty wrath. &lt;sarcasm&gt;Fortunately for us, the water level is just &lsquo;barely&rsquo; low enough for the rangers to keep the river open &ndash; great, so we will just &lsquo;barely&rsquo; survive the trip.&lt;/sarcasm&gt;&nbsp;</p>
<div>Look out for post carnage details&hellip;. (If I survive that is)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/04/03/floaters/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
