<?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>CodeDread Blog &#187; PHP</title>
	<atom:link href="http://www.codedread.com/blog/archives/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 02 Jan 2012 15:30:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Microblogging Floo-Flah</title>
		<link>http://www.codedread.com/blog/archives/2008/07/10/microblogging-floo-flah/</link>
		<comments>http://www.codedread.com/blog/archives/2008/07/10/microblogging-floo-flah/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 07:55:24 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[identi.ca]]></category>
		<category><![CDATA[microblogging]]></category>
		<category><![CDATA[ping.fm]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/07/10/microblogging-floo-flah/</guid>
		<description><![CDATA[Despite my best intentions and my inner voice crying out &#8220;microblogging is stupid!&#8221;, I&#8217;ve been slowly sucked into it. It started innocently enough with the Facebook status. Then I joined the party over at Twitter just to see what all the hubbub was about. When I learned about identi.ca, I decided to check that out [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/social.svgz"><span/></object>Despite my best intentions and my inner voice crying out &#8220;microblogging is stupid!&#8221;, I&#8217;ve been slowly sucked into it.  It started innocently enough with the <a href="http://www.facebook.com/">Facebook</a> status.  Then I joined the party over at <a href="http://www.twitter.com/">Twitter</a> just to see what all the hubbub was about.  When I learned about <a href="http://www.identi.ca/">identi.ca</a>, I decided to check that out a couple days ago (more and more people are joining there now).</p>
<p>The problem, of course, is that not everyone is on the same social network.  And you might not want to be on any of the social networks that I&#8217;m on.  Or you might not trust any of those companies.  Enter <a href="http://ping.fm/">ping.fm</a>.  <span id="more-474"></span></p>
<p>ping.fm serves as a central point for me to <span title="i.e. cross-post">blast out</span> my navel-gazing, mind-numbingly boring status updates to a variety of services (all of the ones mentioned above and more like Plurk, MySpace, Pownce, LinkedIn, Tumblr).  This means when I make a status update at ping.fm, it gets fanned out to all the sites I&#8217;ve ping-enabled (of course I have to give them credentials for each site).</p>
<p>All of this is great but not totally innovative, it&#8217;s just another layer of madness above the existing, silo&#8217;ed madness.  And it doesn&#8217;t solve the fragmented two-way conversation problem (replies on Twitter stay on Twitter, etc).  But what caught my eye this evening was the ability to fan my ping.fm updates to <a href="http://ping.fm/custom/help/">custom URLs</a>.  This means I can set up a PHP page on my own website and ping.fm will send the status updates to that page also.  This opens up some interesting possibilities.</p>
<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/feed.svgz"><span/></object>So I did just that.  I now have a <a href="http://www.codedread.com/μ" title="Jeff Schiller's MicroBlog Feed">microblog/status feed</a> on this site if anyone cares when I brushed my teeth or if I&#8217;m late for a train.  Be the first to know!</p>
<p>How it works:  I use ping.fm to post my status and it is fanned out automatically to Facebook, LinkedIn, Twitter, identi.ca and codedread&#8217;s custom PHP.  That PHP takes the status and adds it to a static Atom file on my site.</p>
<p>So now that I&#8217;ve got a microblog feed that&#8217;s disentangled from any one particular social network, I&#8217;ll probably add some code to my site to display the latest status from my microblog feed somewhere.</p>
<p>Oh and if you don&#8217;t like the funky character in the URL then you can also use <a href="http://www.codedread.com/microblog/">this one</a>.  They both point to the same location.</p>
<p>One request to ping.fm:  Please support OpenID!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/07/10/microblogging-floo-flah/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New XHTML+SVG Theme</title>
		<link>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/</link>
		<comments>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 05:01:58 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/</guid>
		<description><![CDATA[I&#8217;ve been tinkering at a new theme for my website since the Christmas holidays and finally got around to flipping the switch this weekend. I decided to try my hand, for the first time, at real XHTML served as application/xhtml+xml but with PHP content negotiation to text/html for poor ol&#8217; Internet Explorer. I like the [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/party.svgz"><span/></object>I&#8217;ve been tinkering at a new theme for <a href="http://www.codedread.com/">my website</a> since the Christmas holidays and finally got around to flipping the switch this weekend.  I decided to try my hand, for the first time, at real XHTML served as application/xhtml+xml but with PHP content negotiation to text/html for poor ol&#8217; Internet Explorer.  <span id="more-425"></span></p>
<p>I like the idea of having a seamless transition between my blog and website. so this evening I decided to flip the switch on the blog, even though the WordPress theme is very much a work-in-progress.  I still need to figure out what to do with the sidebar,  but I can always hack away on the theme on my old blog installation internally and publish updates once they have been verified on a set of decent browsers (Firefox 2+, Opera 9+, Safari 3+).</p>
<p>I use <a href="http://www.w3.org/Graphics/SVG" title="Scalable Vector Graphics">SVG</a> in a bunch of different places:  inline as decoration around the page (the blue gradient and the title) and referenced (via &#60;object&#62;) for the icon menu (at the top) and W3C validation badges (at the bottom).  Once I nail down all the particulars, I&#8217;ll compress <a href="http://www.codedread.com/menu.svg" title="SVG-enabled icon menu">menu.svg</a> and serve only menu.svgz so it can be neatly cached (at roughly 15kb).  But I&#8217;ll keep menu.svg around for web developers to look at if they&#8217;re curious.</p>
<p>Work on this led to a few bugs reported at Mozilla, WebKit and Opera &#8211; but no show stoppers.  The best user experience is in Opera 9.5.  For the first time, I&#8217;m using declarative animation (in a simple way) for icon mouse-hovering.  Firefox and Safari users miss out for now, unfortunately.</p>
<p>It turns out, as <a href="http://realtech.burningbird.net/standards/adventures-in-xhtml/">Shelley has mentioned</a>, that the best developer experience to work on XHTML is also (by far) Opera.  Instead of Firefox&#8217;s &#8220;yellow screen of death&#8221; we&#8217;re greeted with Opera&#8217;s &#8220;light grey screen of mild achiness&#8221;.  Instead of cryptic messages about unexpected tags, the element which failed to be terminated and the tag that broke the XML parsing are highlighted for you.</p>
<p>I encountered some funniness when I tried to validate my pages on the <a href="http://validator.w3.org/">W3C Validator</a>.  Apparently it thought they were text/html pages.  So I had to add a little catch in my PHP content negotiation code to force application/xhtml+xml when I want to.  Anyway, the PHP content negotiation code looks like this:</p>
<div class="code">&#60;?php<br/>if( (!stristr($_SERVER["HTTP_ACCEPT"],&#8221;application/xhtml+xml&#8221;) &#38;&#38; <br/>&#160;&#160;&#160;&#160; !isset($_GET['xhtml'])) &#124;&#124; $_GET['xhtml'] === &#8217;0&#8242; )<br/>{<br/>&#160;&#160;header(&#8220;Content-Type: text/html;charset=utf-8&#8243;);<br/>&#160;&#160;header(&#8220;Vary: Accept&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;!DOCTYPE HTML PUBLIC \&#8221;-//W3C//DTD HTML 4.01//EN\&#8221;".<br/>&#160;&#160;&#160;&#160;&#8221; \&#8221;http://www.w3.org/TR/html4/strict.dtd\&#8221;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;html lang=\&#8221;en\&#8221;&#62;\n&#8221;);<br/>}<br/>else <br/>{<br/>&#160;&#160;header(&#8220;Content-Type: application/xhtml+xml;charset=utf-8&#8243;);<br/>&#160;&#160;header(&#8220;Vary: Accept&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;&#8221; . &#8220;?xml version=\&#8221;1.0\&#8221; encoding=\&#8221;UTF-8\&#8221; ?&#8221; . &#8220;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;!DOCTYPE html PUBLIC \&#8221;-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN\&#8221;" .<br/>&#160;&#160;&#160;&#160;&#8221;\&#8221;http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\&#8221;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;html xmlns=\&#8221;http://www.w3.org/1999/xhtml\&#8221; xmlns:svg=\&#8221;http://www.w3.org/2000/svg\&#8221;" .<br/>&#160;&#160;&#160;&#160;&#8221; xmlns:xlink=\&#8221;http://www.w3.org/1999/xlink\&#8221; xml:lang=\&#8221;en\&#8221;&#62;\n&#8221;);<br/>}<br/>?&#62;<br/></div>
<p>You might find some of my old site themes amusing, sad, or boring:</p>
<ul>
<li><a href="http://www.codedread.com/archive/2004-04/">2004-04</a> &#8211; Early static HTML, table-based layout, no CSS.</li>
<li><a href="http://www.codedread.com/archive/2005-04/">2005-04</a> &#8211; Reworked into a templated PHP site.  Eventually I turned it from table-based to CSS layout-based (snapshot is table-based).</li>
<li><a href="http://www.codedread.com/archive/2006-01/">2006-01</a> &#8211; Theme from 2006.  Using CSS for layout.  Embedded SVG aqua buttons for navigation menus.  All modern browsers now support the features I was using on this page.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>The Whole PHP5 Migration Thing</title>
		<link>http://www.codedread.com/blog/archives/2008/01/16/the-whole-php5-migration-thing/</link>
		<comments>http://www.codedread.com/blog/archives/2008/01/16/the-whole-php5-migration-thing/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 19:38:41 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/01/16/the-whole-php5-migration-thing/</guid>
		<description><![CDATA[I recently made the switch from PHP4 to PHP5. Let me know if you see any breakages. Lots of hoopla about PHP4 being EOL&#8216;d in 2007, effectively forcing everyone (including hosts) to upgrade to PHP5. Matt from WordPress disses the heavy-handed move to PHP5. I personally like PHP5 better than PHP4, though my site was [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/php.svgz"><span/></object>I recently made the switch from PHP4 to PHP5.  Let me know if you see any breakages.  Lots of hoopla about PHP4 being <span class="definition" title="End Of Life">EOL</span>&#8216;d in 2007, effectively forcing everyone (including hosts) to upgrade to PHP5.  <span id="more-419"></span></p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p><a href="http://photomatt.net/2007/07/13/on-php/">Matt</a> from WordPress disses the heavy-handed move to PHP5.  I personally like PHP5 better than PHP4, though my site was using PHP4 for everything.  I notice Matt says &#8220;there isn’t a released PHP app today that isn’t PHP 5-compatible&#8221;.  But I don&#8217;t think this can be true, unless he means PHP apps that matter to him.  They point to <a href="http://www.php.net/manual/en/migration5.incompatible.php">this page</a> which describes the differences between PHP 4 and 5, but I think something huge is missing from this page: DOM manipulation.  There is a potentially big change to web apps out there that use DOM XML.</p>
<p>The only thing I had to do when migrating was to change my <a href="http://us.php.net/manual/en/ref.domxml.php">DOM XML</a> function calls to use <a href="http://us.php.net/manual/en/ref.dom.php">DOM</a>.</p>
<ul>
<li>DOM XML will &#8220;never be released with PHP 5&#8243;.</li>
<li>DOM is a PHP5-only feature.</li>
</ul>
<p>These changes affect every line of code that used a DOM XML function, but the changes are pretty trivial, especially if you already know the DOM.  XSLT handling is also not backward/forward compatible, from what I understand.</p>
<p>But why does that PHP page neglect to mention this?  This was pointed out in 2004 by Justin Gehring, but the page fails to have been updated as an official notice.  <a href="http://alexandre.alapetite.net/cv/alexandre-alapetite.en.html">Alexandre Alapetite</a> has provided a <a href="http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/">module</a> that, I think, eases this transition (Disclaimer:  I have not used this module because I rewrote my PHP for PHP5).</p>
<p>In all likelihood, I am missing something obvious here &#8211; so please chime in and put me on the clue-train.  Do people typically not manipulate the DOM in PHP?</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/01/16/the-whole-php5-migration-thing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

