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

<channel>
	<title>Cjfay.com - Magic Designagina &#187; Programming</title>
	<atom:link href="http://www.cjfay.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cjfay.com</link>
	<description>You touch my tra-la-la...</description>
	<lastBuildDate>Wed, 28 Jul 2010 12:45:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AdRavage Overhauled</title>
		<link>http://www.cjfay.com/2009/05/12/adravage-overhauled/</link>
		<comments>http://www.cjfay.com/2009/05/12/adravage-overhauled/#comments</comments>
		<pubDate>Wed, 13 May 2009 04:52:22 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[AdRavage]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.cjfay.com/?p=298</guid>
		<description><![CDATA[Just wanted to post an update regarding AdRavage as it has been a while since the last significant changes to the site aesthetically and/or functionally. The UI has been completely redesigned with hopes of making things easier to find, use, and just overall more intuitive. The last design was based on a template and figured it was about time I put together my own design [...]


Related posts:<ol><li><a href='http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/' rel='bookmark' title='Permanent Link: AdRavage.com &#8211; Ad search automation'>AdRavage.com &#8211; Ad search automation</a></li>
<li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
<li><a href='http://www.cjfay.com/2009/05/18/my-top-15-web-links-you-should-know/' rel='bookmark' title='Permanent Link: 15 Web Resources You Should Know'>15 Web Resources You Should Know</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Just wanted to post an update regarding <a href="adravage.com">AdRavage</a> as it has been a while since the last significant changes to the site aesthetically and/or functionally. The UI has been completely redesigned with hopes of making things easier to find, use, and just overall more intuitive. The last design was based on a template and figured it was about time I put together my own design for the site &#8211; hence the updates. </p>
<p>I also updated the codebase with some timezone fixes and things that were causing duplicate emails. If you still receive these it&#8217;s probably because I have your state&#8217;s/city&#8217;s timezone listed incorrectly in the database. Contact me if this is the case. </p>
<p>Let me know what you all think if you get a chance. And as usual, enjoy!</p>
<div class="sexy-bookmarks sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li><li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;Title=AdRavage+Overhauled" rel="external nofollow" title="Share this on Blinklist">Share this on Blinklist</a></li><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Digg this!">Digg this!</a></li><li class="sexy-diigo"><a href="http://www.diigo.com/post?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled&amp;desc=Just%20wanted%20to%20post%20an%20update%20regarding%20AdRavage%20as%20it%20has%20been%20a%20while%20since%20the%20last%20significant%20changes%20to%20the%20site%20aesthetically%20and%2For%20functionally.%20The%20UI%20has%20been%20completely%20redesigned%20with%20hopes%20of%20making%20things%20easier%20to%20find%2C%20use%2C%20and%20just%20overall%20more%20intuitive.%20The%20last%20design%20was%20based%20" rel="external nofollow" title="Post this on Diigo">Post this on Diigo</a></li><li class="sexy-reddit"><a href="http://reddit.com/submit?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/?submitUrl=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;submitHeadline=AdRavage+Overhauled&amp;submitSummary=Just%20wanted%20to%20post%20an%20update%20regarding%20AdRavage%20as%20it%20has%20been%20a%20while%20since%20the%20last%20significant%20changes%20to%20the%20site%20aesthetically%20and%2For%20functionally.%20The%20UI%20has%20been%20completely%20redesigned%20with%20hopes%20of%20making%20things%20easier%20to%20find%2C%20use%2C%20and%20just%20overall%20more%20intuitive.%20The%20last%20design%20was%20based%20&amp;submitCategory=science&amp;submitAssetType=text" rel="external nofollow" title="Buzz up!">Buzz up!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.cjfay.com/2009/05/12/adravage-overhauled/" rel="external nofollow" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-mixx"><a href="http://www.mixx.com/submit?page_url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Share this on Mixx">Share this on Mixx</a></li><li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;t=AdRavage+Overhauled" rel="external nofollow" title="Post this to MySpace">Post this to MySpace</a></li><li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;t=AdRavage+Overhauled" rel="external nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://www.twitter.com/home?status=RT+@chrisfay:+AdRavage+Overhauled+-+http://ri.ms/evq" rel="external nofollow" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?&amp;subject=AdRavage%20Overhauled&amp;body=Just%20wanted%20to%20post%20an%20update%20regarding%20AdRavage%20as%20it%20has%20been%20a%20while%20since%20the%20last%20significant%20changes%20to%20the%20site%20aesthetically%20and%2For%20functionally.%20The%20UI%20has%20been%20completely%20redesigned%20with%20hopes%20of%20making%20things%20easier%20to%20find%2C%20use%2C%20and%20just%20overall%20more%20intuitive.%20The%20last%20design%20was%20based%20 - http://www.cjfay.com/2009/05/12/adravage-overhauled/" rel="external nofollow" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.cjfay.com/2009/05/12/adravage-overhauled/feed" rel="external nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled&amp;summary=Just%20wanted%20to%20post%20an%20update%20regarding%20AdRavage%20as%20it%20has%20been%20a%20while%20since%20the%20last%20significant%20changes%20to%20the%20site%20aesthetically%20and%2For%20functionally.%20The%20UI%20has%20been%20completely%20redesigned%20with%20hopes%20of%20making%20things%20easier%20to%20find%2C%20use%2C%20and%20just%20overall%20more%20intuitive.%20The%20last%20design%20was%20based%20&amp;source=Cjfay.com - Magic Designagina" rel="external nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;h=AdRavage+Overhauled" rel="external nofollow" title="Seed this on Newsvine">Seed this on Newsvine</a></li><li class="sexy-devmarks"><a href="http://devmarks.com/index.php?posttext=Just%20wanted%20to%20post%20an%20update%20regarding%20AdRavage%20as%20it%20has%20been%20a%20while%20since%20the%20last%20significant%20changes%20to%20the%20site%20aesthetically%20and%2For%20functionally.%20The%20UI%20has%20been%20completely%20redesigned%20with%20hopes%20of%20making%20things%20easier%20to%20find%2C%20use%2C%20and%20just%20overall%20more%20intuitive.%20The%20last%20design%20was%20based%20&amp;posturl=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;posttitle=AdRavage+Overhauled" rel="external nofollow" title="Share this on Devmarks">Share this on Devmarks</a></li><li class="sexy-google"><a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.cjfay.com/2009/05/12/adravage-overhauled/title=AdRavage+Overhauled" rel="external nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li><li class="sexy-misterwong"><a href="http://www.mister-wong.com/addurl/?bm_url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;bm_description=AdRavage+Overhauled&amp;plugin=sexybookmarks" rel="external nofollow" title="Add this to Mister Wong">Add this to Mister Wong</a></li><li class="sexy-izeby"><a href="http://izeby.com/add_story.php?story_url=http://www.cjfay.com/2009/05/12/adravage-overhauled/" rel="external nofollow" title="Add this to Izeby">Add this to Izeby</a></li><li class="sexy-tumblr"><a href="http://www.tumblr.com/share?v=3&amp;u=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;t=AdRavage+Overhauled&amp;s=" rel="external nofollow" title="Share this on Tumblr">Share this on Tumblr</a></li><li class="sexy-tipd"><a href="http://tipd.com/submit.php?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/" rel="external nofollow" title="Share this on Tipd">Share this on Tipd</a></li><li class="sexy-pfbuzz"><a href="http://pfbuzz.com/submit?url=http://www.cjfay.com/2009/05/12/adravage-overhauled/&amp;title=AdRavage+Overhauled" rel="external nofollow" title="Share this on PFBuzz">Share this on PFBuzz</a></li></ul><div style="clear:both;"></div></div>

<p>Related posts:<ol><li><a href='http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/' rel='bookmark' title='Permanent Link: AdRavage.com &#8211; Ad search automation'>AdRavage.com &#8211; Ad search automation</a></li>
<li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
<li><a href='http://www.cjfay.com/2009/05/18/my-top-15-web-links-you-should-know/' rel='bookmark' title='Permanent Link: 15 Web Resources You Should Know'>15 Web Resources You Should Know</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2009/05/12/adravage-overhauled/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EnvatoTracker &#8211; Sales notifier (Windows)</title>
		<link>http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/</link>
		<comments>http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/#comments</comments>
		<pubDate>Fri, 01 May 2009 17:07:21 +0000</pubDate>
		<dc:creator>chrisfay</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Desktop Apps]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.cjfay.com/?p=160</guid>
		<description><![CDATA[EnvatoTracker is a Windows desktop tool that polls the Envato API for any new sales and notifies you if one is found either via email, tray popup (with a customizable alert sound), or both. 


  
    
      
    
    
      download: EnvatoTracker (425.01KB)
   [...]


Related posts:<ol><li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>EnvatoTracker is a Windows desktop tool that polls the Envato API for any new sales and notifies you if one is found either via email, tray popup (with a customizable alert sound), or both. </p>
<p><a href='http://www.pledgie.com/campaigns/11086'><img alt='Click here to lend your support to: EnvatoTracker and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/11086.png?skin_name=chrome' border='0' /></a></p>
<p><table class="table" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.cjfay.com/wp-content/plugins/downloads-manager/img/icons/euro48.png" alt="http://www.cjfay.com/wp-content/plugins/downloads-manager/img/icons/euro48.png">
    </td>
    <td>
      <b>download:</b> <a href="http://www.cjfay.com/?file_id=15">EnvatoTracker</a> <small>(425.01KB)</small><br />
      <b>added:</b> 06/03/2010 <br />
      <b>clicks:</b> 731 <br />
      <b>description:</b> Envato sales tracker installer. Requires .Net 2.0 <br />
    </td>
  </tr>
</table><br />
<table class="table" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.cjfay.com/wp-content/plugins/downloads-manager/img/icons/euro48.png" alt="http://www.cjfay.com/wp-content/plugins/downloads-manager/img/icons/euro48.png">
    </td>
    <td>
      <b>download:</b> <a href="http://www.cjfay.com/?file_id=17">EnvatoTracker SRC - Github</a> <small>(13.43KB)</small><br />
      <b>added:</b> 05/12/2010 <br />
      <b>clicks:</b> 559 <br />
      <b>description:</b> Source code - direct download for the EnvatoTracker repository on Github <br />
    </td>
  </tr>
</table></p>
<h3>GITHUB REPOSITORY</h3>
<p><img src="http://www.cjfay.com/wp-content/uploads/2009/05/logov3.png" alt="" title="logov3" width="100" height="45" class="alignleft size-full wp-image-587" />A gihub repository has been created for this project &#8211; you can find it <a href="http://github.com/chrisfay/EnvatoTracker">here</a>. Feel free to fork and make your changes to EnvatoTracker, and push your updated branch once your done. I&#8217;ve pulled the src download hosted on my site and now point to the one hosted on Github &#8211; feel free to either git the repo or download directly via above. If you plan to make changes you will want to fork a new branch &#8211; see <a href="http://help.github.com/forking/">http://help.github.com/forking/</a>. </p>
<div class="clear" style="clear:both"></div>
<h3>APP DETAILS:</h3>
<p><strong>Currrent version</strong>: 0.5.2.0<br />
<strong>Last Updated</strong>: 7/28/2010<br />
<strong>Author</strong>: Chris Fay<br />
<strong>Language</strong>: C#/.Net 2.0/VS2005</p>
<h3>NOTE:</h3>
<p> Requires <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&#038;displaylang=en">.Net 2.0+</a></p>
<h3>RECENT CHANGES:</h3>
<ul>
<li>1. added icons</li>
<li>2. added system tray option to launch portfolio/sales info</li>
<li>3. validate username/apikey before polling api</li>
<li>4. fixed app not showing in task bar when restored</li>
<li>5. some minor other updates</li>
<li>6. Fixed shutdown issue (system wouldn&#8217;t shutdown until app was closed)</li>
</ul>
<h3>SETUP:</h3>
<p>
1. Install <br />
2. Enter user information through GUI<br />
3. Verify notify options in GUI<br />
4. If email notifications needed you will need to input your smtp server information into config.ini</p>
<p>If all is setup propery you will see your total sales in the green box.</p>
<p>If using Windows 7, you&#8217;ll need to do the following:<br />
<img src="http://cjfay.com/images/sec.png" /></p>
<p>Enjoy!<br />
Please <a href="mailto:&#099;&#104;&#114;&#105;&#115;&#102;&#097;&#121;&#064;&#099;&#104;&#114;&#105;&#115;&#102;&#097;&#121;&#046;&#110;&#101;&#116;">contact me</a> with any questions or feedback.</p>
<h3>SCREENSHOTS:</h3>
<p><img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot12.png" alt="trackerscreenshot12" title="trackerscreenshot12" width="408" height="313" class="alignnone size-full wp-image-185" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot2.png" alt="Notification options pane" title="Notification options pane" width="376" height="295" class="alignnone size-full wp-image-163" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot3.png" alt="Email example" title="Email example" width="570" height="209" class="alignnone size-full wp-image-164" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot7.png" alt="Right click context menu" title="Right click context menu" width="214" height="117" class="alignnone size-full wp-image-188" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot4.png" alt="New sales popup" title="New sales popup" width="195" height="118" class="alignnone size-full wp-image-166" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot5.png" alt="Configuration reminder on open" title="Configuration reminder on open" width="323" height="131" class="alignnone size-full wp-image-167" /><br />
<img src="http://www.cjfay.com/wp-content/uploads/2009/05/trackerscreenshot6.png" alt="Config parms" title="Config parms" width="545" height="693" class="alignnone size-full wp-image-169" /></p>
<div class="sexy-bookmarks sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li><li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;Title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on Blinklist">Share this on Blinklist</a></li><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Digg this!">Digg this!</a></li><li class="sexy-diigo"><a href="http://www.diigo.com/post?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29&amp;desc=EnvatoTracker%20is%20a%20Windows%20desktop%20tool%20that%20polls%20the%20Envato%20API%20for%20any%20new%20sales%20and%20notifies%20you%20if%20one%20is%20found%20either%20via%20email%2C%20tray%20popup%20%28with%20a%20customizable%20alert%20sound%29%2C%20or%20both.%20%0D%0A%0D%0A%0D%0A%0D%0A%5Bdm%5D15%5B%2Fdm%5D%0D%0A%5Bdm%5D17%5B%2Fdm%5D%0D%0A%0D%0AGITHUB%20REPOSITORY%0D%0AA%20gihub%20repository%20has%20been%20created%20for%20this%20project%20-%20" rel="external nofollow" title="Post this on Diigo">Post this on Diigo</a></li><li class="sexy-reddit"><a href="http://reddit.com/submit?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/?submitUrl=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;submitHeadline=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29&amp;submitSummary=EnvatoTracker%20is%20a%20Windows%20desktop%20tool%20that%20polls%20the%20Envato%20API%20for%20any%20new%20sales%20and%20notifies%20you%20if%20one%20is%20found%20either%20via%20email%2C%20tray%20popup%20%28with%20a%20customizable%20alert%20sound%29%2C%20or%20both.%20%0D%0A%0D%0A%0D%0A%0D%0A%5Bdm%5D15%5B%2Fdm%5D%0D%0A%5Bdm%5D17%5B%2Fdm%5D%0D%0A%0D%0AGITHUB%20REPOSITORY%0D%0AA%20gihub%20repository%20has%20been%20created%20for%20this%20project%20-%20&amp;submitCategory=science&amp;submitAssetType=text" rel="external nofollow" title="Buzz up!">Buzz up!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/" rel="external nofollow" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-mixx"><a href="http://www.mixx.com/submit?page_url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on Mixx">Share this on Mixx</a></li><li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;t=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Post this to MySpace">Post this to MySpace</a></li><li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;t=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://www.twitter.com/home?status=RT+@chrisfay:+EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29+-+http://ri.ms/gh25" rel="external nofollow" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?&amp;subject=EnvatoTracker%20%26%238211%3B%20Sales%20notifier%20%28Windows%29&amp;body=EnvatoTracker%20is%20a%20Windows%20desktop%20tool%20that%20polls%20the%20Envato%20API%20for%20any%20new%20sales%20and%20notifies%20you%20if%20one%20is%20found%20either%20via%20email%2C%20tray%20popup%20%28with%20a%20customizable%20alert%20sound%29%2C%20or%20both.%20%0D%0A%0D%0A%0D%0A%0D%0A%5Bdm%5D15%5B%2Fdm%5D%0D%0A%5Bdm%5D17%5B%2Fdm%5D%0D%0A%0D%0AGITHUB%20REPOSITORY%0D%0AA%20gihub%20repository%20has%20been%20created%20for%20this%20project%20-%20 - http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/" rel="external nofollow" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/feed" rel="external nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29&amp;summary=EnvatoTracker%20is%20a%20Windows%20desktop%20tool%20that%20polls%20the%20Envato%20API%20for%20any%20new%20sales%20and%20notifies%20you%20if%20one%20is%20found%20either%20via%20email%2C%20tray%20popup%20%28with%20a%20customizable%20alert%20sound%29%2C%20or%20both.%20%0D%0A%0D%0A%0D%0A%0D%0A%5Bdm%5D15%5B%2Fdm%5D%0D%0A%5Bdm%5D17%5B%2Fdm%5D%0D%0A%0D%0AGITHUB%20REPOSITORY%0D%0AA%20gihub%20repository%20has%20been%20created%20for%20this%20project%20-%20&amp;source=Cjfay.com - Magic Designagina" rel="external nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;h=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Seed this on Newsvine">Seed this on Newsvine</a></li><li class="sexy-devmarks"><a href="http://devmarks.com/index.php?posttext=EnvatoTracker%20is%20a%20Windows%20desktop%20tool%20that%20polls%20the%20Envato%20API%20for%20any%20new%20sales%20and%20notifies%20you%20if%20one%20is%20found%20either%20via%20email%2C%20tray%20popup%20%28with%20a%20customizable%20alert%20sound%29%2C%20or%20both.%20%0D%0A%0D%0A%0D%0A%0D%0A%5Bdm%5D15%5B%2Fdm%5D%0D%0A%5Bdm%5D17%5B%2Fdm%5D%0D%0A%0D%0AGITHUB%20REPOSITORY%0D%0AA%20gihub%20repository%20has%20been%20created%20for%20this%20project%20-%20&amp;posturl=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;posttitle=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on Devmarks">Share this on Devmarks</a></li><li class="sexy-google"><a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li><li class="sexy-misterwong"><a href="http://www.mister-wong.com/addurl/?bm_url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;bm_description=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29&amp;plugin=sexybookmarks" rel="external nofollow" title="Add this to Mister Wong">Add this to Mister Wong</a></li><li class="sexy-izeby"><a href="http://izeby.com/add_story.php?story_url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/" rel="external nofollow" title="Add this to Izeby">Add this to Izeby</a></li><li class="sexy-tumblr"><a href="http://www.tumblr.com/share?v=3&amp;u=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;t=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29&amp;s=" rel="external nofollow" title="Share this on Tumblr">Share this on Tumblr</a></li><li class="sexy-tipd"><a href="http://tipd.com/submit.php?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/" rel="external nofollow" title="Share this on Tipd">Share this on Tipd</a></li><li class="sexy-pfbuzz"><a href="http://pfbuzz.com/submit?url=http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/&amp;title=EnvatoTracker+%26%238211%3B+Sales+notifier+%28Windows%29" rel="external nofollow" title="Share this on PFBuzz">Share this on PFBuzz</a></li></ul><div style="clear:both;"></div></div>

<p>Related posts:<ol><li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2009/05/01/envatotracker-sales-notifier-windows/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<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 they become virtually impossible to parse &#8211; at least by [...]


Related posts:<ol><li><a href='http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/' rel='bookmark' title='Permanent Link: Fix odd characters in Wordpress posts'>Fix odd characters in Wordpress posts</a></li>
<li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
<li><a href='http://www.cjfay.com/2009/05/12/adravage-overhauled/' rel='bookmark' title='Permanent Link: AdRavage Overhauled'>AdRavage Overhauled</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>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 they become virtually impossible to parse &#8211; 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 &#8211; 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 &#8211; 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 &#8211; 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>
<div class="sexy-bookmarks sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li><li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;Title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on Blinklist">Share this on Blinklist</a></li><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Digg this!">Digg this!</a></li><li class="sexy-diigo"><a href="http://www.diigo.com/post?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS&amp;desc=I%20recently%20discovered%20that%20Craigslist%27s%20rss%20feeds%20leave%20much%20to%20be%20desired%20in%20terms%20of%20well%20formed%20xml.%20A%20large%20portion%20of%20the%20AdRavage%20back-end%20magic%20works%20by%20parsing%20the%20rss%20results%20of%20searches%2C%20and%20the%20bulk%20of%20this%20is%20achieved%20through%20Magpie%20RSS.%20Unfortunately%2C%20when%20returned%20feeds%20contain%20invalid" rel="external nofollow" title="Post this on Diigo">Post this on Diigo</a></li><li class="sexy-reddit"><a href="http://reddit.com/submit?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/?submitUrl=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;submitHeadline=Parsing+mal-formed+rss+feeds+with+Magpie+RSS&amp;submitSummary=I%20recently%20discovered%20that%20Craigslist%27s%20rss%20feeds%20leave%20much%20to%20be%20desired%20in%20terms%20of%20well%20formed%20xml.%20A%20large%20portion%20of%20the%20AdRavage%20back-end%20magic%20works%20by%20parsing%20the%20rss%20results%20of%20searches%2C%20and%20the%20bulk%20of%20this%20is%20achieved%20through%20Magpie%20RSS.%20Unfortunately%2C%20when%20returned%20feeds%20contain%20invalid&amp;submitCategory=science&amp;submitAssetType=text" rel="external nofollow" title="Buzz up!">Buzz up!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/" rel="external nofollow" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-mixx"><a href="http://www.mixx.com/submit?page_url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on Mixx">Share this on Mixx</a></li><li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;t=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Post this to MySpace">Post this to MySpace</a></li><li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;t=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://www.twitter.com/home?status=RT+@chrisfay:+Parsing+mal-formed+rss+feeds+with+Magpie+RSS+-+http://ri.ms/emqj" rel="external nofollow" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?&amp;subject=Parsing%20mal-formed%20rss%20feeds%20with%20Magpie%20RSS&amp;body=I%20recently%20discovered%20that%20Craigslist%27s%20rss%20feeds%20leave%20much%20to%20be%20desired%20in%20terms%20of%20well%20formed%20xml.%20A%20large%20portion%20of%20the%20AdRavage%20back-end%20magic%20works%20by%20parsing%20the%20rss%20results%20of%20searches%2C%20and%20the%20bulk%20of%20this%20is%20achieved%20through%20Magpie%20RSS.%20Unfortunately%2C%20when%20returned%20feeds%20contain%20invalid - http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/" rel="external nofollow" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/feed" rel="external nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS&amp;summary=I%20recently%20discovered%20that%20Craigslist%27s%20rss%20feeds%20leave%20much%20to%20be%20desired%20in%20terms%20of%20well%20formed%20xml.%20A%20large%20portion%20of%20the%20AdRavage%20back-end%20magic%20works%20by%20parsing%20the%20rss%20results%20of%20searches%2C%20and%20the%20bulk%20of%20this%20is%20achieved%20through%20Magpie%20RSS.%20Unfortunately%2C%20when%20returned%20feeds%20contain%20invalid&amp;source=Cjfay.com - Magic Designagina" rel="external nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;h=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Seed this on Newsvine">Seed this on Newsvine</a></li><li class="sexy-devmarks"><a href="http://devmarks.com/index.php?posttext=I%20recently%20discovered%20that%20Craigslist%27s%20rss%20feeds%20leave%20much%20to%20be%20desired%20in%20terms%20of%20well%20formed%20xml.%20A%20large%20portion%20of%20the%20AdRavage%20back-end%20magic%20works%20by%20parsing%20the%20rss%20results%20of%20searches%2C%20and%20the%20bulk%20of%20this%20is%20achieved%20through%20Magpie%20RSS.%20Unfortunately%2C%20when%20returned%20feeds%20contain%20invalid&amp;posturl=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;posttitle=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on Devmarks">Share this on Devmarks</a></li><li class="sexy-google"><a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li><li class="sexy-misterwong"><a href="http://www.mister-wong.com/addurl/?bm_url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;bm_description=Parsing+mal-formed+rss+feeds+with+Magpie+RSS&amp;plugin=sexybookmarks" rel="external nofollow" title="Add this to Mister Wong">Add this to Mister Wong</a></li><li class="sexy-izeby"><a href="http://izeby.com/add_story.php?story_url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/" rel="external nofollow" title="Add this to Izeby">Add this to Izeby</a></li><li class="sexy-tumblr"><a href="http://www.tumblr.com/share?v=3&amp;u=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;t=Parsing+mal-formed+rss+feeds+with+Magpie+RSS&amp;s=" rel="external nofollow" title="Share this on Tumblr">Share this on Tumblr</a></li><li class="sexy-tipd"><a href="http://tipd.com/submit.php?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/" rel="external nofollow" title="Share this on Tipd">Share this on Tipd</a></li><li class="sexy-pfbuzz"><a href="http://pfbuzz.com/submit?url=http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/&amp;title=Parsing+mal-formed+rss+feeds+with+Magpie+RSS" rel="external nofollow" title="Share this on PFBuzz">Share this on PFBuzz</a></li></ul><div style="clear:both;"></div></div>

<p>Related posts:<ol><li><a href='http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/' rel='bookmark' title='Permanent Link: Fix odd characters in Wordpress posts'>Fix odd characters in Wordpress posts</a></li>
<li><a href='http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/' rel='bookmark' title='Permanent Link: Wordpress HowTo &#8211; Fix missing category information'>Wordpress HowTo &#8211; Fix missing category information</a></li>
<li><a href='http://www.cjfay.com/2009/05/12/adravage-overhauled/' rel='bookmark' title='Permanent Link: AdRavage Overhauled'>AdRavage Overhauled</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AdRavage.com &#8211; 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 search terms, how often to search those terms, and ultimately [...]


Related posts:<ol><li><a href='http://www.cjfay.com/2009/05/12/adravage-overhauled/' rel='bookmark' title='Permanent Link: AdRavage Overhauled'>AdRavage Overhauled</a></li>
<li><a href='http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/' rel='bookmark' title='Permanent Link: Parsing mal-formed rss feeds with Magpie RSS'>Parsing mal-formed rss feeds with Magpie RSS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a title="AdRavage.com" href="http://adravage.com" target="_blank">AdRavage.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="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"><a href="http://www.cjfay.com/wp-content/uploads/2008/10/adravage.jpg"><img class=" 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>
<div class="sexy-bookmarks sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li><li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;Title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on Blinklist">Share this on Blinklist</a></li><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Digg this!">Digg this!</a></li><li class="sexy-diigo"><a href="http://www.diigo.com/post?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation&amp;desc=AdRavage.com%20is%20released%21%0D%0AAs%20some%20of%20you%20already%20know%2C%20I%E2%80%99ve%20been%20working%20on%20a%20site%20that%20lets%20you%20automate%20searching%20on%20websites%20such%20as%20Craigslist.%20I%20recently%20needed%20to%20purchase%20a%20vehicle%20and%20was%20repeatedly%20beaten%20to%20the%20punch%20by%20others%20who%20were%20able%20to%20monitor%20the%20ads%20much%20closer%20than%20I.%20AdRavag" rel="external nofollow" title="Post this on Diigo">Post this on Diigo</a></li><li class="sexy-reddit"><a href="http://reddit.com/submit?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/?submitUrl=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;submitHeadline=AdRavage.com+%26%238211%3B+Ad+search+automation&amp;submitSummary=AdRavage.com%20is%20released%21%0D%0AAs%20some%20of%20you%20already%20know%2C%20I%E2%80%99ve%20been%20working%20on%20a%20site%20that%20lets%20you%20automate%20searching%20on%20websites%20such%20as%20Craigslist.%20I%20recently%20needed%20to%20purchase%20a%20vehicle%20and%20was%20repeatedly%20beaten%20to%20the%20punch%20by%20others%20who%20were%20able%20to%20monitor%20the%20ads%20much%20closer%20than%20I.%20AdRavag&amp;submitCategory=science&amp;submitAssetType=text" rel="external nofollow" title="Buzz up!">Buzz up!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/" rel="external nofollow" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-mixx"><a href="http://www.mixx.com/submit?page_url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on Mixx">Share this on Mixx</a></li><li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;t=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Post this to MySpace">Post this to MySpace</a></li><li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;t=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://www.twitter.com/home?status=RT+@chrisfay:+AdRavage.com+%26%238211%3B+Ad+search+automation+-+http://ri.ms/arlg" rel="external nofollow" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?&amp;subject=AdRavage.com%20%26%238211%3B%20Ad%20search%20automation&amp;body=AdRavage.com%20is%20released%21%0D%0AAs%20some%20of%20you%20already%20know%2C%20I%E2%80%99ve%20been%20working%20on%20a%20site%20that%20lets%20you%20automate%20searching%20on%20websites%20such%20as%20Craigslist.%20I%20recently%20needed%20to%20purchase%20a%20vehicle%20and%20was%20repeatedly%20beaten%20to%20the%20punch%20by%20others%20who%20were%20able%20to%20monitor%20the%20ads%20much%20closer%20than%20I.%20AdRavag - http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/" rel="external nofollow" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/feed" rel="external nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation&amp;summary=AdRavage.com%20is%20released%21%0D%0AAs%20some%20of%20you%20already%20know%2C%20I%E2%80%99ve%20been%20working%20on%20a%20site%20that%20lets%20you%20automate%20searching%20on%20websites%20such%20as%20Craigslist.%20I%20recently%20needed%20to%20purchase%20a%20vehicle%20and%20was%20repeatedly%20beaten%20to%20the%20punch%20by%20others%20who%20were%20able%20to%20monitor%20the%20ads%20much%20closer%20than%20I.%20AdRavag&amp;source=Cjfay.com - Magic Designagina" rel="external nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;h=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Seed this on Newsvine">Seed this on Newsvine</a></li><li class="sexy-devmarks"><a href="http://devmarks.com/index.php?posttext=AdRavage.com%20is%20released%21%0D%0AAs%20some%20of%20you%20already%20know%2C%20I%E2%80%99ve%20been%20working%20on%20a%20site%20that%20lets%20you%20automate%20searching%20on%20websites%20such%20as%20Craigslist.%20I%20recently%20needed%20to%20purchase%20a%20vehicle%20and%20was%20repeatedly%20beaten%20to%20the%20punch%20by%20others%20who%20were%20able%20to%20monitor%20the%20ads%20much%20closer%20than%20I.%20AdRavag&amp;posturl=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;posttitle=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on Devmarks">Share this on Devmarks</a></li><li class="sexy-google"><a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li><li class="sexy-misterwong"><a href="http://www.mister-wong.com/addurl/?bm_url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;bm_description=AdRavage.com+%26%238211%3B+Ad+search+automation&amp;plugin=sexybookmarks" rel="external nofollow" title="Add this to Mister Wong">Add this to Mister Wong</a></li><li class="sexy-izeby"><a href="http://izeby.com/add_story.php?story_url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/" rel="external nofollow" title="Add this to Izeby">Add this to Izeby</a></li><li class="sexy-tumblr"><a href="http://www.tumblr.com/share?v=3&amp;u=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;t=AdRavage.com+%26%238211%3B+Ad+search+automation&amp;s=" rel="external nofollow" title="Share this on Tumblr">Share this on Tumblr</a></li><li class="sexy-tipd"><a href="http://tipd.com/submit.php?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/" rel="external nofollow" title="Share this on Tipd">Share this on Tipd</a></li><li class="sexy-pfbuzz"><a href="http://pfbuzz.com/submit?url=http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/&amp;title=AdRavage.com+%26%238211%3B+Ad+search+automation" rel="external nofollow" title="Share this on PFBuzz">Share this on PFBuzz</a></li></ul><div style="clear:both;"></div></div>

<p>Related posts:<ol><li><a href='http://www.cjfay.com/2009/05/12/adravage-overhauled/' rel='bookmark' title='Permanent Link: AdRavage Overhauled'>AdRavage Overhauled</a></li>
<li><a href='http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/' rel='bookmark' title='Permanent Link: Parsing mal-formed rss feeds with Magpie RSS'>Parsing mal-formed rss feeds with Magpie RSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/10/20/adravagecom-ad-search-automation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress HowTo &#8211; 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[Tutorials]]></category>
		<category><![CDATA[Web]]></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 default, but for some reason a huge number of them [...]


Related posts:<ol><li><a href='http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/' rel='bookmark' title='Permanent Link: Fix odd characters in Wordpress posts'>Fix odd characters in Wordpress posts</a></li>
<li><a href='http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/' rel='bookmark' title='Permanent Link: Parsing mal-formed rss feeds with Magpie RSS'>Parsing mal-formed rss feeds with Magpie RSS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>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.</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: #000033;">$totalUpdates</span>
<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></pre></div></div>

<div class="sexy-bookmarks sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li><li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;Title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on Blinklist">Share this on Blinklist</a></li><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Digg this!">Digg this!</a></li><li class="sexy-diigo"><a href="http://www.diigo.com/post?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information&amp;desc=I%20recently%20found%20that%20somehow%20a%20large%20number%20of%20my%20posts%20where%20completely%20missing%20from%20wp_term_relationships%2C%20which%20is%20responsible%20for%20mapping%20posts%20to%20their%20appropriate%20categories%20in%20version%202.6.1.%0D%0A%0D%0AI%20think%20this%20happened%20after%20upgrading%20a%20few%20versions%20back%2C%20but%20had%20never%20actively%20used%20categories%20" rel="external nofollow" title="Post this on Diigo">Post this on Diigo</a></li><li class="sexy-reddit"><a href="http://reddit.com/submit?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/?submitUrl=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;submitHeadline=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information&amp;submitSummary=I%20recently%20found%20that%20somehow%20a%20large%20number%20of%20my%20posts%20where%20completely%20missing%20from%20wp_term_relationships%2C%20which%20is%20responsible%20for%20mapping%20posts%20to%20their%20appropriate%20categories%20in%20version%202.6.1.%0D%0A%0D%0AI%20think%20this%20happened%20after%20upgrading%20a%20few%20versions%20back%2C%20but%20had%20never%20actively%20used%20categories%20&amp;submitCategory=science&amp;submitAssetType=text" rel="external nofollow" title="Buzz up!">Buzz up!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/" rel="external nofollow" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-mixx"><a href="http://www.mixx.com/submit?page_url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on Mixx">Share this on Mixx</a></li><li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;t=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Post this to MySpace">Post this to MySpace</a></li><li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;t=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://www.twitter.com/home?status=RT+@chrisfay:+Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information+-+http://ri.ms/yroa" rel="external nofollow" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?&amp;subject=Wordpress%20HowTo%20%26%238211%3B%20Fix%20missing%20category%20information&amp;body=I%20recently%20found%20that%20somehow%20a%20large%20number%20of%20my%20posts%20where%20completely%20missing%20from%20wp_term_relationships%2C%20which%20is%20responsible%20for%20mapping%20posts%20to%20their%20appropriate%20categories%20in%20version%202.6.1.%0D%0A%0D%0AI%20think%20this%20happened%20after%20upgrading%20a%20few%20versions%20back%2C%20but%20had%20never%20actively%20used%20categories%20 - http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/" rel="external nofollow" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/feed" rel="external nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information&amp;summary=I%20recently%20found%20that%20somehow%20a%20large%20number%20of%20my%20posts%20where%20completely%20missing%20from%20wp_term_relationships%2C%20which%20is%20responsible%20for%20mapping%20posts%20to%20their%20appropriate%20categories%20in%20version%202.6.1.%0D%0A%0D%0AI%20think%20this%20happened%20after%20upgrading%20a%20few%20versions%20back%2C%20but%20had%20never%20actively%20used%20categories%20&amp;source=Cjfay.com - Magic Designagina" rel="external nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;h=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Seed this on Newsvine">Seed this on Newsvine</a></li><li class="sexy-devmarks"><a href="http://devmarks.com/index.php?posttext=I%20recently%20found%20that%20somehow%20a%20large%20number%20of%20my%20posts%20where%20completely%20missing%20from%20wp_term_relationships%2C%20which%20is%20responsible%20for%20mapping%20posts%20to%20their%20appropriate%20categories%20in%20version%202.6.1.%0D%0A%0D%0AI%20think%20this%20happened%20after%20upgrading%20a%20few%20versions%20back%2C%20but%20had%20never%20actively%20used%20categories%20&amp;posturl=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;posttitle=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on Devmarks">Share this on Devmarks</a></li><li class="sexy-google"><a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li><li class="sexy-misterwong"><a href="http://www.mister-wong.com/addurl/?bm_url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;bm_description=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information&amp;plugin=sexybookmarks" rel="external nofollow" title="Add this to Mister Wong">Add this to Mister Wong</a></li><li class="sexy-izeby"><a href="http://izeby.com/add_story.php?story_url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/" rel="external nofollow" title="Add this to Izeby">Add this to Izeby</a></li><li class="sexy-tumblr"><a href="http://www.tumblr.com/share?v=3&amp;u=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;t=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information&amp;s=" rel="external nofollow" title="Share this on Tumblr">Share this on Tumblr</a></li><li class="sexy-tipd"><a href="http://tipd.com/submit.php?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/" rel="external nofollow" title="Share this on Tipd">Share this on Tipd</a></li><li class="sexy-pfbuzz"><a href="http://pfbuzz.com/submit?url=http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/&amp;title=Wordpress+HowTo+%26%238211%3B+Fix+missing+category+information" rel="external nofollow" title="Share this on PFBuzz">Share this on PFBuzz</a></li></ul><div style="clear:both;"></div></div>

<p>Related posts:<ol><li><a href='http://www.cjfay.com/2008/06/14/fix-odd-characters-in-wordpress-posts/' rel='bookmark' title='Permanent Link: Fix odd characters in Wordpress posts'>Fix odd characters in Wordpress posts</a></li>
<li><a href='http://www.cjfay.com/2008/10/25/parsing-mal-formed-rss-feeds-with-magpie-rss/' rel='bookmark' title='Permanent Link: Parsing mal-formed rss feeds with Magpie RSS'>Parsing mal-formed rss feeds with Magpie RSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cjfay.com/2008/09/16/wordpress-howto-fix-missing-category-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</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>chrisfay</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 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...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...) and built a php script to basically:

1. Loop through every post in the Wordpress database
2. Find and replace all the garbled characters
3. Re-insert the data

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.

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.
<pre lang="PHP">
<br />
<b>Warning</b>:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'dbUserNameHere'@'localhost' (using password: YES) in <b>/home1/cjfaycom/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code</b> on line <b>44</b><br />
Error connecting to mysql