<?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>EyedMax's Pit &#187; Development</title>
	<atom:link href="http://eyedmax.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://eyedmax.com</link>
	<description>Yeah, you're right. It's me ;)</description>
	<lastBuildDate>Sat, 05 Sep 2009 00:44:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://eyedmax.com</link>
  <url>http://eyedmax.com/favicon.ico</url>
  <title>EyedMax's Pit</title>
</image>
		<item>
		<title>What to do if your blog was hacked by evil eval</title>
		<link>http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/</link>
		<comments>http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 00:44:23 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Optimisation]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Tweak]]></category>

		<guid isPermaLink="false">http://eyedmax.com/?p=210</guid>
		<description><![CDATA[Weird things happens. Mostly in WordPress. One morning you see that your permalinks became a something like this:

blah/%&#38;&#40;&#123;$&#123;eval&#40;base64_decode&#40;$_SERVER&#91;HTTP_REFERER&#93;&#41;&#41;&#125;&#125;&#124;.+&#41;&#38;%/

Or this:

â€œ/%&#38;&#40;%7B$%7Beval&#40;base64_decode&#40;$_SERVER%5BHTTP_EXECCODE%5D&#41;&#41;%7D%7D&#124;.+&#41;&#38;%

Or your feed crapped like this:

error on line 22 at column 71: xmlParseEntityRef: no name wordpress

Do not panic &#8211; you&#8217;re hacked. And there is three steps to get rid of it.
1) Restore your permalinks
Go to Admin panel [...]]]></description>
			<content:encoded><![CDATA[<p>Weird things happens. Mostly in WordPress. One morning you see that your permalinks became a something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">blah<span style="color: #339933;">/%&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span>base64_decode<span style="color: #009900;">&#40;</span>$_SERVER<span style="color: #009900;">&#91;</span>HTTP_REFERER<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">|</span>.<span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;%/</span></pre></div></div>

<p>Or this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">â€œ<span style="color: #339933;">/%&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">%</span>7B$<span style="color: #339933;">%</span>7Beval<span style="color: #009900;">&#40;</span>base64_decode<span style="color: #009900;">&#40;</span>$_SERVER<span style="color: #339933;">%</span>5BHTTP_EXECCODE<span style="color: #339933;">%</span>5D<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">%</span>7D<span style="color: #339933;">%</span>7D<span style="color: #339933;">|</span>.<span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;%</span></pre></div></div>

<p>Or your feed crapped like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">error on line 22 at column 71: xmlParseEntityRef: no name wordpress</pre></div></div>

<p>Do not panic &#8211; you&#8217;re hacked. And there is three steps to get rid of it.</p>
<p><strong>1) Restore your permalinks</strong><br />
Go to <em>Admin panel</em> -> <em>Settings</em> -> <em>Permalinks</em>.<br />
Set your permalink structure to whatever it was earlier. If you don&#8217;t even imagine what it was &#8211; you can always ask google for it &#8211; just like this: <strong>site:yourblogurl.com</strong> &#8211; and you&#8217;ll see the answer in the links to your site.</p>
<p><strong>2) Kill the intruder(s)</strong><br />
Go to your preferred mysql administration tool (say, MySqlAdmin) and run this code in the SQL window:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> <span style="color: #008000;">`wp<span style="color: #008080; font-weight: bold;">_</span>usermeta`</span>
<span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #008000;">`meta<span style="color: #008080; font-weight: bold;">_</span>value`</span> <span style="color: #CC0099; font-weight: bold;">LIKE</span> <span style="color: #008000;">'<span style="color: #008080; font-weight: bold;">%</span>script<span style="color: #008080; font-weight: bold;">%</span>'</span></pre></div></div>

<p>You&#8217;ll see the list of records, write down <strong>user_id</strong>s of those guys.<br />
Go to <em>Admin panel</em> -> <em>Users</em> -> <em>Authors &#038; Users</em>, copy the <strong>edit</strong> link for any user, it&#8217;ll be somethings like:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://yourblogurl.com/wp-admin/user-edit.php?user_id=14&amp;wp_http_referer=%2Fwp-admin%2Fusers.php</pre></div></div>

<p>Then paste it into address line, and change user_id=<strong>XX</strong> to the first user_id you wrote. Go.<br />
Replace <strong>First name</strong> with whatever you want (for example &#8220;z&#8221;), insert &#8220;motherfncker@test.com&#8221; into <strong>Email</strong> field (or whatever, but remember it, you&#8217;ll need it later) and set the <strong>Role</strong> into <em>Subscriber</em>. Push Update user. Then repeat with the next one in your <strong>user_id</strong>s list. After you finished &#8211; just type in into the search line word &#8220;motherfncker&#8221; (or whatever you set emails to). Now &#8211; just <strong>delete</strong> bastards!</p>
<p><strong>3) Defend the base</strong><br />
Just upgrade your wordpress. If you will do it periodically &#8211; there will be no such problems at all!</p>
<p><strong>If you do not have ability to use some SQL tool &#8211; you can try to blind find bastards:</strong><br />
Go to <em>Admin panel</em> -> <em>Users</em> -> <em>Authors &#038; Users</em><br />
Note the number of Admin users (right under &#8220;Users&#8221; header). One of them is you, all others &#8211; bastard ones <img src='http://eyedmax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Try to find max. <em>user_id</em> in the list by hovering your mouse over links. Then copy the edit link of the user with topmost ID, insert it into address line, change it to next number and go. Did not work? Try the next number. Or previous one. You can even loop through all IDs not in use. And when you&#8217;ll find him &#8211; you know what to do! </p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=210&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2009/01/03/wordpress-dashboard-problem-fix/" title="WordPress Dashboard problem fix (January 3, 2009)">WordPress Dashboard problem fix</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/22/wordpress-221/" title="WordPress 2.2.1 (June 22, 2007)">WordPress 2.2.1</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/04/25/wordpress-2-updated/" title="WordPress 2 updated (April 25, 2007)">WordPress 2 updated</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/07/20/war-against-spam-wasp/" title="War Against SPam &#8211; WASP! (July 20, 2007)">War Against SPam &#8211; WASP!</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/07/20/war-against-spam-step-two/" title="War Against SPam &#8211; step two! (July 20, 2007)">War Against SPam &#8211; step two!</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Scriplaculous Sortable Demo Fix</title>
		<link>http://eyedmax.com/2009/04/20/advanced-scriplaculous-sortable-demo/</link>
		<comments>http://eyedmax.com/2009/04/20/advanced-scriplaculous-sortable-demo/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 00:22:01 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JS/Ajax]]></category>

		<guid isPermaLink="false">http://eyedmax.com/?p=198</guid>
		<description><![CDATA[Heh.
There is a good example of using nested Scriplaculous Sortables. With one little flaw &#8211; Scriplaculous ver 1.6.x is used, and when you try to execute the code with newer version of library &#8211; sections.each is not a function error pops up.  
Here is the way to fix it &#8211; you&#8217;ll probably need it [...]]]></description>
			<content:encoded><![CDATA[<p>Heh.</p>
<p>There is a <a href="http://www.gregphoto.net/index.php/2006/05/30/updated-scriplaculous-sortable-demo/" target="_blank">good example</a> of using nested Scriplaculous Sortables. With one little flaw &#8211; Scriplaculous ver 1.6.x is used, and when you try to execute the code with newer version of library &#8211; <span style="color: #ff0000;">sections.each is not a function</span> error pops up.  </p>
<p>Here is the way to fix it &#8211; you&#8217;ll probably need it if you want to save the results <img src='http://eyedmax.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />   </p>
<p>Just replace &#8220;document.getElementsByClassName(&#8217;section&#8217;);&#8221; to &#8220;$$(&#8216;.section&#8217;);&#8221;  </p>
<p><strong>Before</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> getGroupOrder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> sections <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>getElementsByClassName<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'section'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> alerttext <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	sections<span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>section<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> sectionID <span style="color: #339933;">=</span> section<span style="color: #339933;">.</span>id<span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> order <span style="color: #339933;">=</span> Sortable<span style="color: #339933;">.</span><span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span>sectionID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		alerttext <span style="color: #339933;">+=</span> sectionID <span style="color: #339933;">+</span> <span style="color: #0000ff;">': '</span> <span style="color: #339933;">+</span> Sortable<span style="color: #339933;">.</span>sequence<span style="color: #009900;">&#40;</span>section<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">'\n'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	alert<span style="color: #009900;">&#40;</span>alerttext<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>After</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> getGroupOrder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> sections <span style="color: #339933;">=</span> $$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.section'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> alerttext <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	sections<span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>section<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> sectionID <span style="color: #339933;">=</span> section<span style="color: #339933;">.</span>id<span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> order <span style="color: #339933;">=</span> Sortable<span style="color: #339933;">.</span><span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span>sectionID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		alerttext <span style="color: #339933;">+=</span> sectionID <span style="color: #339933;">+</span> <span style="color: #0000ff;">': '</span> <span style="color: #339933;">+</span> Sortable<span style="color: #339933;">.</span>sequence<span style="color: #009900;">&#40;</span>section<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">'\n'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	alert<span style="color: #009900;">&#40;</span>alerttext<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then modify it for your needs and go on )</p>
<p>What was that?<br />
Quote:</p>
<blockquote><p>As of Prototype 1.6, document.getElementsByClassName has been deprecated since native implementations return a NodeList rather than an Array.</p></blockquote>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=198&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/" title="UTF-8 fix &#8211; when charset is set to Latin1 (June 23, 2007)">UTF-8 fix &#8211; when charset is set to Latin1</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/26/scrap/" title="Scrap (June 26, 2007)">Scrap</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/05/31/php-4-and-xml/" title="PHP 4 and XML (May 31, 2007)">PHP 4 and XML</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2009/04/20/advanced-scriplaculous-sortable-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixed BoxOver js library</title>
		<link>http://eyedmax.com/2008/05/28/fixed-boxover-js-library/</link>
		<comments>http://eyedmax.com/2008/05/28/fixed-boxover-js-library/#comments</comments>
		<pubDate>Wed, 28 May 2008 00:23:32 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2008/05/28/fixed-boxover-js-library/</guid>
		<description><![CDATA[Hi there, my dear java-damned-script fans!
Today I used to find an strange bug in pretty little fine-looking-hints library, called BoxOver from here. As you know, for the chars &#34;, [ and ] with this library you must use &#38;quot;, [[ and ]] to display&#8230; It works, but only once for brackets.
So, I tried to find [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there, my dear java-damned-script fans!</p>
<p><img style="border-right: 0px; border-top: 0px; margin: 5px 0px 0px 15px; border-left: 0px; border-bottom: 0px" height="170" alt="boxover" src="http://eyedmax.com/wp-content/uploads/2008/05/boxover.jpg" width="259" align="right" border="0" />Today I used to find an strange bug in pretty little fine-looking-hints library, called BoxOver from <a title="Swazz Boxover" href="http://boxover.swazz.org/" target="_blank">here</a>. As you know, for the chars &quot;, [ and ] with this library you must use &amp;quot;, [[ and ]] to display&#8230; It works, but only once for brackets.</p>
<p>So, I tried to find a fix&#8230; None found. At the forum some guy gave an ugly fix with &amp;rbr; and so on&#8230;</p>
<p>Shame on you guys, did you ever heard of regexp syntax? <img src='http://eyedmax.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Here&#8217;s the BoxOver library with fixed [ and ] brackets display:</p>
<p><a title="Nice, light and fast tooltip javascript library download, fixed" href="http://eyedmax.com/download-manager.php?id=9">Download BoxOver 2.1a javascript library (28th May 2008)</a></p>
<p>BTW, when I tried to register on forum to post my fix &#8211; I can&#8217;t &#8211; because of captcha insult, and that&#8217;s why I posted it here.</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=137&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/08/21/wanna-buy-a-pligg/" title="Wanna buy a PLIGG? (August 21, 2007)">Wanna buy a PLIGG?</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/" title="UTF-8 fix &#8211; when charset is set to Latin1 (June 23, 2007)">UTF-8 fix &#8211; when charset is set to Latin1</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/08/06/sendmail-for-windows-freeware/" title="Sendmail for Windows Freeware (August 6, 2007)">Sendmail for Windows Freeware</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/26/scrap/" title="Scrap (June 26, 2007)">Scrap</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2008/05/28/fixed-boxover-js-library/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>User agent switcher</title>
		<link>http://eyedmax.com/2008/05/07/user-agent-switcher/</link>
		<comments>http://eyedmax.com/2008/05/07/user-agent-switcher/#comments</comments>
		<pubDate>Wed, 07 May 2008 19:13:33 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2008/05/07/user-agent-switcher/</guid>
		<description><![CDATA[Helpful thing (for web developer)
Firefox plugin User Agent Switcher&#160;
But check out Safari 3.1 for Windows. Preferences =&#62; Advanced tab, enable Develop menu and &#8211; voila! &#8211; you have all you want and many more things. Actually it remembered me FireBug extension for FireFox.
Enjoy  

	Related posts
	
	No related posts.
	

]]></description>
			<content:encoded><![CDATA[<p>Helpful thing (for web developer)</p>
<p>Firefox plugin <a title="User Agent Switcher" href="https://addons.mozilla.org/en-US/firefox/addon/59" target="_blank" rel="nofollow">User Agent Switcher</a>&#160;</p>
<p>But check out Safari 3.1 for Windows. Preferences =&gt; Advanced tab, enable Develop menu and &#8211; voila! &#8211; you have all you want and many more things. Actually it remembered me FireBug extension for FireFox.</p>
<p>Enjoy <img src='http://eyedmax.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=132&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2008/05/07/user-agent-switcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wanna buy a PLIGG?</title>
		<link>http://eyedmax.com/2007/08/21/wanna-buy-a-pligg/</link>
		<comments>http://eyedmax.com/2007/08/21/wanna-buy-a-pligg/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 23:57:39 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/08/21/wanna-buy-a-pligg/</guid>
		<description><![CDATA[ Pligg is now for sale. Do you wanna buy it? Sale includes the pligg.com domain along with all web content created for the site including graphic design work, blog and forum administrator accounts, rights to the Sourceforge.net account. You can buy it here.
Shit.

	Related posts
	
	Sendmail for Windows Freeware (0)
	Fixed BoxOver js library (3)
	BlogJet (0)
	BlogDesk software [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eyedmax.com/wp-content/uploads/2007/08/pligg-com-sale.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px 0px 0px; border-left: 0px; border-bottom: 0px" height="72" alt="pligg-com-sale" src="http://eyedmax.com/wp-content/uploads/2007/08/pligg-com-sale-thumb.png" width="160" align="left" border="0"></a> Pligg is now for sale. Do you wanna buy it? Sale includes the pligg.com domain along with all web content created for the site including graphic design work, blog and forum administrator accounts, rights to the Sourceforge.net account. You can buy it <a href="http://www.sedo.com/search/details.php4?domain=pligg.com" target="_blank" rel="nofollow">here</a>.</p>
<p>Shit.</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=100&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/08/06/sendmail-for-windows-freeware/" title="Sendmail for Windows Freeware (August 6, 2007)">Sendmail for Windows Freeware</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
	<li><a href="http://eyedmax.com/2007/07/31/blogjet/" title="BlogJet (July 31, 2007)">BlogJet</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/07/21/blogdesk-software/" title="BlogDesk software (July 21, 2007)">BlogDesk software</a> (1)</li>
	<li><a href="http://eyedmax.com/2007/08/14/3d-cover-design-in-two-clicks/" title="3D cover design in two clicks (August 14, 2007)">3D cover design in two clicks</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/08/21/wanna-buy-a-pligg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are you a web developer for real?</title>
		<link>http://eyedmax.com/2007/07/20/are-you-a-web-developer-for-real/</link>
		<comments>http://eyedmax.com/2007/07/20/are-you-a-web-developer-for-real/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 19:34:41 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Server]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/07/20/are-you-a-web-developer-for-real/</guid>
		<description><![CDATA[Just a simple test.
Check this out.
If all you see &#8211; is your browser&#8217;s &#8220;not found&#8221; page &#8211; well, bad luck! All others &#8211; welcome to the club!

	Related posts
	
	youthumb &#8211; another video plugin (0)
	Fixed BoxOver js library (3)
	Feed ShowZ plugin update (0)
	Feed ShowZ plugin for WordPress 2.x (0)
	Developers versus clients (0)


]]></description>
			<content:encoded><![CDATA[<p>Just a simple test.</p>
<p>Check <a href="http://localhost/" rel="nofollow">this</a> out.</p>
<p>If all you see &#8211; is your browser&#8217;s &#8220;not found&#8221; page &#8211; well, bad luck! All others &#8211; welcome to the club!</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=51&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
	<li><a href="http://eyedmax.com/2007/04/25/feed-showz-plugin-update/" title="Feed ShowZ plugin update (April 25, 2007)">Feed ShowZ plugin update</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/02/15/feed-showz-plugin-for-wordpress-2x/" title="Feed ShowZ plugin for WordPress 2.x (February 15, 2007)">Feed ShowZ plugin for WordPress 2.x</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/04/developers-versus-clients/" title="Developers versus clients (June 4, 2007)">Developers versus clients</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/07/20/are-you-a-web-developer-for-real/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrap</title>
		<link>http://eyedmax.com/2007/06/26/scrap/</link>
		<comments>http://eyedmax.com/2007/06/26/scrap/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 23:30:53 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/06/26/scrap/</guid>
		<description><![CDATA[Hmmmm&#8230;
The previous piece of code is a scrap if you have to deal with MySql4 server with all-defaults.
So&#8230; I continued my challenge &#8211; I want my data back (and workin&#8217;) 
Stay tuned for next round&#8230;
P.S. For MySql5 all works great&#8230;

	Related posts
	
	youthumb &#8211; another video plugin (0)
	What to do if your blog was hacked by evil [...]]]></description>
			<content:encoded><![CDATA[<p>Hmmmm&#8230;<br />
The previous piece of code is a scrap if you have to deal with MySql4 server with all-defaults.<br />
So&#8230; I continued my challenge &#8211; I want my data back (and workin&#8217;) <img src='http://eyedmax.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Stay tuned for next round&#8230;</p>
<p>P.S. For MySql5 all works great&#8230;</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=39&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/" title="What to do if your blog was hacked by evil eval (September 5, 2009)">What to do if your blog was hacked by evil eval</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
	<li><a href="http://eyedmax.com/2007/04/25/feed-showz-plugin-update/" title="Feed ShowZ plugin update (April 25, 2007)">Feed ShowZ plugin update</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/02/15/feed-showz-plugin-for-wordpress-2x/" title="Feed ShowZ plugin for WordPress 2.x (February 15, 2007)">Feed ShowZ plugin for WordPress 2.x</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/06/26/scrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF-8 fix &#8211; when charset is set to Latin1</title>
		<link>http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/</link>
		<comments>http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 21:28:14 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/</guid>
		<description><![CDATA[Situation: you have MySQL 5 database with tables which claimed to have Latin1 charset. You filled the base (with MySQL Front, PhpMyAdmin or any other tool) with info. There IS non alnum chars (like TM, (c), long â€“, ellipsis etc.)
Now you want it back, and your pages are utf-8 encoded, but when you queries the [...]]]></description>
			<content:encoded><![CDATA[<p>Situation: you have MySQL 5 database with tables which claimed to have Latin1 charset. You filled the base (with MySQL Front, PhpMyAdmin or any other tool) with info. There IS non alnum chars (like TM, (c), long â€“, ellipsis etc.)</p>
<p>Now you want it back, and your pages are utf-8 encoded, but when you queries the base, â€??â€™ sign returned instead of your cute symbols. Shit.</p>
<p>Never mind, if you can see those chars with PhpMyAdmin â€“ Iâ€™ll help you to convert them to use them.</p>
<p>First, mysql5 seems to be utf-8 lover (even if other charset is claimed). So â€“ itâ€™s simple. Just exec <strong>SET NAMES utf8</strong> right after database initialisation.</p>
<p>Second, query all the data you need into array.</p>
<p>Third, just do utf8_encode on data with your loved scrap <img src="http://eyedmax.com/wp-content/uploads/2007/06/smile32.gif" /></p>
<p>Forth, exec <strong>SET NAMES latin1</strong></p>
<p>Fifth â€“ write your data back</p>
<p>Sixth â€“ tell your application to use utf8_decode when reading and utf8_encode when writing those data.</p>
<p>Thatâ€™s all â€“ now you can easilly transfer your data to <strike>MySQL4</strike>* or MySQL5 servers â€“ and your app will work there!</p>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// init skipped </span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*********************************** 
 * Database connect 
 **********************************/</span> 
<span style="color: #000088;">$o_db</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> myDB<span style="color: #009900;">&#40;</span>DB<span style="color: #339933;">::</span><span style="color: #004000;">connect</span><span style="color: #009900;">&#40;</span>DB_DSN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_setFetchMode</span><span style="color: #009900;">&#40;</span>DB_FETCHMODE_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SET NAMES utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$q</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'SELECT page_id, page_head_title, page_head_description, page_head_keywords 
  FROM '</span><span style="color: #339933;">.</span>DB_PREFIX<span style="color: #339933;">.</span><span style="color: #0000ff;">'pages 
'</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page_head_title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page_head_description'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page_head_keywords'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #000088;">$page</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$field</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">utf8_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$field</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SET NAMES latin1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
  <span style="color: #000088;">$up</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'UPDATE '</span><span style="color: #339933;">.</span>DB_PREFIX<span style="color: #339933;">.</span><span style="color: #0000ff;">'pages 
    SET 
    page_head_title = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_quote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_head_title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', 
    page_head_description = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_quote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_head_description'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', 
    page_head_keywords = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_quote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_head_keywords'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', 
    WHERE page_id = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_quote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' 
  '</span><span style="color: #339933;">;</span> 
  <span style="color: #000088;">$o_db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$up</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>*see next post</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=38&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/" title="What to do if your blog was hacked by evil eval (September 5, 2009)">What to do if your blog was hacked by evil eval</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
	<li><a href="http://eyedmax.com/2007/04/25/feed-showz-plugin-update/" title="Feed ShowZ plugin update (April 25, 2007)">Feed ShowZ plugin update</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/02/15/feed-showz-plugin-for-wordpress-2x/" title="Feed ShowZ plugin for WordPress 2.x (February 15, 2007)">Feed ShowZ plugin for WordPress 2.x</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.2.1</title>
		<link>http://eyedmax.com/2007/06/22/wordpress-221/</link>
		<comments>http://eyedmax.com/2007/06/22/wordpress-221/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 02:11:55 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/06/22/wordpress-221/</guid>
		<description><![CDATA[Oops, WordPress 2.2.1 is out, and I&#8217;m still not ready!
Ok, I upgraded all the blogs with my plugs, and let&#8217;s see what happens.

	Related posts
	
	WordPress Dashboard problem fix (0)
	WordPress 2 updated (0)
	What to do if your blog was hacked by evil eval (0)
	New WordPress version (0)
	New Wordpress (0)


]]></description>
			<content:encoded><![CDATA[<p>Oops, WordPress 2.2.1 is out, and I&rsquo;m still not ready!</p>
<p>Ok, I upgraded all the blogs with my plugs, and let&rsquo;s see what happens.</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=36&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2009/01/03/wordpress-dashboard-problem-fix/" title="WordPress Dashboard problem fix (January 3, 2009)">WordPress Dashboard problem fix</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/04/25/wordpress-2-updated/" title="WordPress 2 updated (April 25, 2007)">WordPress 2 updated</a> (0)</li>
	<li><a href="http://eyedmax.com/2009/09/05/what-to-do-if-your-blog-was-hacke/" title="What to do if your blog was hacked by evil eval (September 5, 2009)">What to do if your blog was hacked by evil eval</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/01/23/new-wordpress-version/" title="New WordPress version (January 23, 2007)">New WordPress version</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/05/20/new-wordpress/" title="New Wordpress (May 20, 2007)">New Wordpress</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/06/22/wordpress-221/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developers versus clients</title>
		<link>http://eyedmax.com/2007/06/04/developers-versus-clients/</link>
		<comments>http://eyedmax.com/2007/06/04/developers-versus-clients/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 19:24:52 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/06/04/developers-versus-clients/</guid>
		<description><![CDATA[Why always they think that coding &#8211; it&#8217;s an instant process?
Just another little quote:
We were under the understanding that coding would have been complete and we were to have seen your work late last week
Yeah, right. Do you meanÂ next week?

	Related posts
	
	youthumb &#8211; another video plugin (0)
	UTF-8 fix &#8211; when charset is set to Latin1 (0)
	Scrap [...]]]></description>
			<content:encoded><![CDATA[<p>Why always they think that coding &#8211; it&#8217;s an instant process?</p>
<p>Just another little quote:</p>
<blockquote><p>We were under the understanding that coding would have been complete and we were to have seen your work late last week</p></blockquote>
<p>Yeah, right. Do you meanÂ <strong>next</strong> week?</p>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=31&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/23/utf-8-fix-when-charset-is-set-to-latin1/" title="UTF-8 fix &#8211; when charset is set to Latin1 (June 23, 2007)">UTF-8 fix &#8211; when charset is set to Latin1</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/26/scrap/" title="Scrap (June 26, 2007)">Scrap</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/05/31/php-4-and-xml/" title="PHP 4 and XML (May 31, 2007)">PHP 4 and XML</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/06/04/developers-versus-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 4 and XML</title>
		<link>http://eyedmax.com/2007/05/31/php-4-and-xml/</link>
		<comments>http://eyedmax.com/2007/05/31/php-4-and-xml/#comments</comments>
		<pubDate>Thu, 31 May 2007 12:42:06 +0000</pubDate>
		<dc:creator>eyedmax</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://eyedmax.com/2007/05/31/php-4-and-xml/</guid>
		<description><![CDATA[What a mess.
Php 4 had no human usable XML handling implementation.And almost all libraries it&#8217;s a mess&#8230;
I found one good article about it, but it&#8217;s in russian.OK, I&#8217;ll try to translate it later (maybe only examples &#160;)
And as for me &#8211; I found what i wanted. Small and effective library.
Here it is under more tag


&#60;?php
 [...]]]></description>
			<content:encoded><![CDATA[<p>What a mess.</p>
<p>Php 4 had no human usable XML handling implementation.<br />And almost all libraries it&rsquo;s a mess&hellip;</p>
<p>I found one good article about it, but it&rsquo;s in russian.<br />OK, I&rsquo;ll try to translate it later (maybe only examples <img src="http://eyedmax.com/wp-content/uploads/2007/05/smile3.gif" / / />&nbsp;)</p>
<p>And as for me &ndash; I found what i wanted. Small and effective library.</p>
<p>Here it is under more tag</p>
<p><span id="more-29"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
 <span style="color: #000088;">$p</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;&quot;</span> <span style="color: #000000; font-weight: bold;">new</span> xmlparser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$p</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/* XML file*/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> xmlParser<span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$xml_obj</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$attrs</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> xmlParser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
       <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xml_parser_create</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #990000;">xml_set_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #990000;">xml_set_character_data_handler</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'dataHandler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #990000;">xml_set_element_handler</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;startHandler&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;endHandler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> parse<span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</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: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
           <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Cannot open XML data file: <span style="color: #006699; font-weight: bold;">$path</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</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: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><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: #339933;">!</span><span style="color: #990000;">xml_parse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #990000;">feof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
               <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;XML error: <span style="color: #009933; font-weight: bold;">%s</span> at line <span style="color: #009933; font-weight: bold;">%d</span>&quot;</span><span style="color: #339933;">,</span>
               <span style="color: #990000;">xml_error_string</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">xml_get_error_code</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
               <span style="color: #990000;">xml_get_current_line_number</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               <span style="color: #990000;">xml_parser_free</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xml_obj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span>
       <span style="color: #009900;">&#125;</span>
&nbsp;
       <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> startHandler<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attribs</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$_content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$_content</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$name</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attribs</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #000088;">$_content</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attrs'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$attribs</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> dataHandler<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</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: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$data</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$_output_idx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_output_idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'content'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> endHandler<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$name</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: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$_output_idx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$add</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_output_idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'child'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_output_idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'child'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">output</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_output_idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'child'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>  
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p></more></p>
<div class="bjtags">Tags:  <a rel="tag" href="http://technorati.com/tag/simple+PHP+4+XML+library">simple+PHP+4+XML+library</a></div>
<img src="http://eyedmax.com/?ak_action=api_record_view&id=29&type=feed" alt="" />
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://eyedmax.com/2007/03/27/youthumb-another-video-plugin/" title="youthumb &#8211; another video plugin (March 27, 2007)">youthumb &#8211; another video plugin</a> (0)</li>
	<li><a href="http://eyedmax.com/2008/05/28/fixed-boxover-js-library/" title="Fixed BoxOver js library (May 28, 2008)">Fixed BoxOver js library</a> (3)</li>
	<li><a href="http://eyedmax.com/2007/04/25/feed-showz-plugin-update/" title="Feed ShowZ plugin update (April 25, 2007)">Feed ShowZ plugin update</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/02/15/feed-showz-plugin-for-wordpress-2x/" title="Feed ShowZ plugin for WordPress 2.x (February 15, 2007)">Feed ShowZ plugin for WordPress 2.x</a> (0)</li>
	<li><a href="http://eyedmax.com/2007/06/04/developers-versus-clients/" title="Developers versus clients (June 4, 2007)">Developers versus clients</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://eyedmax.com/2007/05/31/php-4-and-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
