<?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>Work experience &#187; Web</title>
	<atom:link href="http://experience.masalas.org/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://experience.masalas.org</link>
	<description>It&#039;s all about IT</description>
	<lastBuildDate>Fri, 05 Mar 2010 16:15:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cross-browser (x)html testing</title>
		<link>http://experience.masalas.org/web/cross-browser-xhtml-testing/</link>
		<comments>http://experience.masalas.org/web/cross-browser-xhtml-testing/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 16:08:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/?p=336</guid>
		<description><![CDATA[So, you&#8217;ve done another great (x)html template from psd? And here comes a headache.  IE7 does not render exactly as it was written in css. Old buggy IE&#8230; So how to test on all general browsers? How to test on IE6, IE7, Firefox Opera browsers using one PC? It&#8217;s not so comfortable to install all [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;ve done another great (x)html template from psd? And here comes a headache.  IE7 does not render exactly as it was written in css. Old buggy IE&#8230; So how to test on all general browsers? How to test on IE6, IE7, Firefox Opera browsers using one PC? It&#8217;s not so comfortable to install all browsers, or use virtualization such as vmware.</p>
<p>So, there is one great free resource (and a few paid resources) to get browser screen shots. One of my favorite is <a href="http://www.browsershots.org">browsershots.org</a>. It&#8217;s free, until you can wait in a line a few minutes. But it get&#8217;s annoying to wait after small css fix and after waiting to find out that this fix didn&#8217;t worked.</p>
<p><a href="http://experience.masalas.org/wp-content/uploads/browsershots.jpg" rel="lightbox[336]"><img class="aligncenter size-medium wp-image-338" title="browsershots" src="http://experience.masalas.org/wp-content/uploads/browsershots-300x150.jpg" alt="" width="300" height="150" /></a><span id="more-336"></span>So I&#8217;ve found a great solution: there is <a href="http://www.spoon.net">http://www.spoon.net</a> who gives availability to run all major windows browsers from browser. Just install little plugin and go to <a href="http://www.spoon.net/Browsers/">http://www.spoon.net/Browsers/</a>. Here you can run Internet Explorer 8, Internet Explorer 7, and Internet Explorer 6,  Firefox 3.5, Firefox 3 and Firefox 2,  Safari 4, Safari 3, Chrome, Opera 10 and Opera 9 without installing them to your PC.</p>
<p><a href="http://experience.masalas.org/wp-content/uploads/spoon_browsers.jpg" rel="lightbox[336]"><img class="aligncenter size-medium wp-image-339" title="spoon_browsers" src="http://experience.masalas.org/wp-content/uploads/spoon_browsers-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>Oh, ant spoon.net gives app integration to other websites. Look, you can run Google Chrome from my blog ;)</p>
<p><script type="text/javascript">// <![CDATA[
Spoon_AppName='Chrome';Spoon_MaxPrefetch=10;
// ]]&gt;</script><script src="http://start.spoon.net/render" type="text/javascript"></script></p>
<pre>
</pre>
<p>(somehow it does not work from my blog. And I cannot find support contact. Well at least it works in their page :)<br />
How all spoon stuff works you can read in their <a href="http://www.spoon.net/Developers/">info page.</a></p>
<p>Wish you a painless css hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/cross-browser-xhtml-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Application Security</title>
		<link>http://experience.masalas.org/web/web-application-security/</link>
		<comments>http://experience.masalas.org/web/web-application-security/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 10:39:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/?p=328</guid>
		<description><![CDATA[
Every programmer makes mistakes. It especially hurts when security hole was found and used. So it is important to test security before launching a project.
There is really nice and open web security resource on the web. It is called OWASP. It is open, not affiliated with any commercial structure, so its cool and free :)
You [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://experience.masalas.org/wp-content/uploads/owasp.jpg" rel="lightbox[328]"><img class="aligncenter size-medium wp-image-329" title="owasp" src="http://experience.masalas.org/wp-content/uploads/owasp-300x188.jpg" alt="owasp page" width="300" height="188" /></a></p>
<p><a href="http://experience.masalas.org/wp-content/uploads/owasp.jpg" rel="lightbox[328]"></a>Every programmer makes mistakes. It especially hurts when security hole was found and used. So it is important to test security before launching a project.</p>
<p>There is really nice and open web security resource on the web. It is called <cite title="Open Web Application Security Project">OWASP</cite>. It is open, not affiliated with any commercial structure, so its cool and free :)</p>
<p>You can jump and start reading whole security guide here: <a href="http://www.owasp.org/index.php/OWASP_Testing_Guide_v3_Table_of_Contents">OWASP Testing Guide</a>. Have a lucky testing ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/web-application-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php file upload</title>
		<link>http://experience.masalas.org/web/php-file-upload/</link>
		<comments>http://experience.masalas.org/web/php-file-upload/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:11:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/?p=321</guid>
		<description><![CDATA[I had one weird bug recently. I&#8217;ve made &#8220;LOVE&#8221; module for opencart which is working in  http://www.mothereleganza.com. Basically this module is some sort of image gallery.  So i&#8217;ve grabbed default opencart&#8217;s style to add images:

As you can see there are list of allready uploaded images, a file upload form fields and a remove buttons. So, [...]]]></description>
			<content:encoded><![CDATA[<p>I had one weird bug recently. I&#8217;ve made &#8220;LOVE&#8221; module for <a href="http://www.opencart.com/">opencart</a> which is working in  <a href="http://www.mothereleganza.com ">http://www.mothereleganza.com</a>. Basically this module is some sort of image gallery.  So i&#8217;ve grabbed default opencart&#8217;s style to add images:</p>
<p><a href="http://experience.masalas.org/wp-content/uploads/ocart_images.jpg" rel="lightbox[321]"><img class="aligncenter size-medium wp-image-323" title="ocart_images" src="http://experience.masalas.org/wp-content/uploads/ocart_images-300x196.jpg" alt="" width="300" height="196" /></a></p>
<p>As you can see there are list of allready uploaded images, a file upload form fields and a remove buttons. So, If you hit Save button, you get uploaded new images, replaced old images if there are specified files and removed unneeded images. It looks like ease to use interface, but there is one bug: you have as many file uploads as files are uploaded. So after client added 20 images, all upload stuff stopped working. Why? Because PHP limits not only file size, but even a file count. In current server  <strong>max_file_uploads </strong>option was set to 20. So it is possible to upload 20 files at once.</p>
<p>Fast decision was to remove file input fields from uploaded images. It will not be able to replace current image with a new one, but it is not necessary in my case.</p>
<p><a href="http://experience.masalas.org/wp-content/uploads/ocart_love_images.jpg" rel="lightbox[321]"><img class="aligncenter size-medium wp-image-324" title="ocart_love_images" src="http://experience.masalas.org/wp-content/uploads/ocart_love_images-300x217.jpg" alt="" width="300" height="217" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/php-file-upload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP MVC framework</title>
		<link>http://experience.masalas.org/web/php-mvc-framework/</link>
		<comments>http://experience.masalas.org/web/php-mvc-framework/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 16:02:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/?p=310</guid>
		<description><![CDATA[ When you become higher level than basic PHP coder, you start to ask yourself: do I need to rewrite these common pieces of code again and again? New webapp and again -  I need to implement connection to database, content selection, input validation and use some sort of template system? But its boring! And [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://experience.masalas.org/wp-content/uploads/kohanaphp.jpg" rel="lightbox[310]"><img class="size-medium wp-image-312 alignleft" title="Kohana php framework" src="http://experience.masalas.org/wp-content/uploads/kohanaphp-300x180.jpg" alt="Kohana php MVC framework" width="300" height="180" /></a> When you become higher level than basic PHP coder, you start to ask yourself: do I need to rewrite these common pieces of code again and again? New webapp and again -  I need to implement connection to database, content selection, input validation and use some sort of template system? But its boring! And I&#8217;m to lazy to repeat this again and again. :) And here comes helpful tools, like custom written classes, collection of functions reusable in most projects etc.</p>
<p>But sometimes even these are not enough. So what to do? I suggest you to give a chance to a framework. There are a bunch of these: <a href="http://www.codeigniter.com/">CodeIgniter</a>, <a href="http://cakephp.org/">CakePHP</a>, <a title="Kohana php" href="http://www.kohanaphp.com/">Kohana</a>, <a href="http://www.symfony-project.org/">Symfony</a>, <a href="http://www.yiiframework.com/">Yii</a>, <a href="http://framework.zend.com/">Zend </a>and <a title="top 10 php frameworks." href="http://www.phpframeworks.com/top-10-php-frameworks/">much more!</a> I think <a href="http://www.phpframeworks.com/">http://www.phpframeworks.com/</a> will help you to choose framework for your taste.</p>
<p>Personally I have tried two of them:  CakePHP and Kohana. CakePHP was &#8220;first date&#8221; with a <cite title="Model View Controller">MVC</cite> framework. As I was young and inexperienced, it didn&#8217;t give me a very good impression. Even sample given with documentation didn&#8217;t work. Oh, I even didn&#8217;t understood why I need it. :)</p>
<p>But time passed, and I started to understand &#8211; using MVC is great option building bigger webapps or websites. So I gave another chance to a framework called Kohana.</p>
<p>Kohana is a PHP 5 framework that uses the Model View Controller architectural pattern. It is Originally based on <a href="http://www.codeigniter.com/">CodeIgniter</a>.</p>
<p>Why MVC? Well About MVC you can read here: <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">Model-View-Controller</a>. Usually in Model you write database queries, return them to a Controller which handles given data and returns it to a View. In a View goes all data layout or simply &#8211; template. But that&#8217;s not a limit, you even don&#8217;t need to use database sometimes to use MVC and so on. That&#8217;s great when application logic is separated from layout!</p>
<p>So, if you choose to start learning KohanaPHP, begin from great tutorial &#8211; <strong>Kohana 101. </strong>It is tutorial written by Oscar Bajner and shows how to write basic webapp using Kohana PHP framework. You can read it here: <a href="http://dev.kohanaphp.com/wiki/kohana2/Kohana101">kohana 101</a> or Download it here: <a href="http://experience.masalas.org/wp-content/uploads/kohana101v2.pdf">kohana101</a>.</p>
<p>After reading and completing your first web site by yourself, go straight to <a href="http://docs.kohanaphp.com/">Kohana documentation</a> page, here you will get all needed help, also they have informative and helpful <a href="http://forum.kohanaphp.com/">forum</a>.</p>
<p>Okay, Kohanians, off we go&#8230; ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/php-mvc-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usefull 404</title>
		<link>http://experience.masalas.org/web/usefull-404/</link>
		<comments>http://experience.masalas.org/web/usefull-404/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:38:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/?p=300</guid>
		<description><![CDATA[
As I&#8217;ve changed CMS from etomite to wordpress, friendly url&#8217;s are changed a bit. Essentially  shortened URL and removed &#8220;.html&#8221; from the end.
But what to do  with old links? I had two options:

Create redirects to updated URLs
Make use of 404 error page

I&#8217;ve chosen 2nd option, as it is more elegant and requires a few work [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://experience.masalas.org/wp-content/uploads/friendly-url-search.png" rel="lightbox[300]"><img class="size-medium wp-image-304 aligncenter" style="margin-top: 10px; margin-bottom: 10px;" title="friendly url search" src="http://experience.masalas.org/wp-content/uploads/friendly-url-search-300x222.png" alt="friendly url search 404" width="300" height="222" /></a></p>
<p>As I&#8217;ve changed CMS from etomite to wordpress, friendly url&#8217;s are changed a bit. Essentially  shortened URL and removed &#8220;.html&#8221; from the end.</p>
<p>But what to do  with old links? I had two options:</p>
<ol>
<li>Create redirects to updated URLs</li>
<li>Make use of 404 error page</li>
</ol>
<p>I&#8217;ve chosen 2nd option, as it is more elegant and requires a few work &#8211; more automation.</p>
<p>So, I was thinking: how can I redirect users comming from old URLs to new ones? And here I thought &#8211; if link is old one, I get 404. Here I can get that old link and redirect to a new one. Of course that idea is not new, so I&#8217;ve googled a bit and found ready made solution:  <a href="http://archgfx.net/blog/2007/geek/blogging/adding-search-results-to-wordpress-404-pages">Adding Search results to Wordpress 404 pages</a></p>
<p>This is more better than moving automatically, because not all 404&#8217;s would be from old links and if someone mistypes address &#8211; he/she will get search results.</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/usefull-404/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regexp generator</title>
		<link>http://experience.masalas.org/web/regexp-generator/</link>
		<comments>http://experience.masalas.org/web/regexp-generator/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 10:26:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/online-regexp-generator.html</guid>
		<description><![CDATA[
In my experience to-do list one of points are &#8220;To know regular expressions better&#8221;. But until I can write regexp with my closed eyes, I use very useful resource on web:
RegExr
P.S. Sorry comments does not work. Something changed in new etomite cms. In a future I should migrate to wordpress I assume :)
Update: Wordpres is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://experience.masalas.org/wp/wp-content/uploads/regexr.png" rel="lightbox[64]"><img class="size-medium wp-image-116  aligncenter" title="regexr" src="http://experience.masalas.org/wp-content/uploads/regexr-300x178.png" alt="Regexr - regexp generator" width="300" height="178" /></a></p>
<p>In my experience to-do list one of points are &#8220;To know regular expressions better&#8221;. But until I can write regexp with my closed eyes, I use very useful resource on web:</p>
<p><a href="http://gskinner.com/RegExr/" target="_blank">RegExr</a></p>
<p><del datetime="2010-01-21T17:40:46+00:00">P.S. Sorry comments does not work. Something changed in new etomite cms. In a future I should migrate to wordpress I assume :)</del><br />
<strong>Update:</strong> Wordpres is here ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/regexp-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP exec time</title>
		<link>http://experience.masalas.org/web/php-exec-time/</link>
		<comments>http://experience.masalas.org/web/php-exec-time/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 13:32:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/get-php-mysql-execution-time.html</guid>
		<description><![CDATA[Sometimes, I need to optimize pieces of code, especially mysql query execution time. But how to check if some piece of code is faster than other?
I use PHP function
microtime&#40;&#41;
Thats how it looks like:
$code_starts = microtime&#40;true&#41;;
&#8230;
&#60;some code&#62;
&#8230;
$code_ends = microtime&#40;true&#41;;
$execution_time = $code_ends &#8211; $code_starts;
echo &#34;Done in: &#34;.$execution_time.&#34; s&#34;;
Have a nice bottleneck  finding!
]]></description>
			<content:encoded><![CDATA[<p>Sometimes, I need to optimize pieces of code, especially mysql query execution time. But how to check if some piece of code is faster than other?<br />
I use PHP function</p>
<div class="dean_ch" style="white-space: nowrap;"><a href="http://www.php.net/microtime"><span class="kw3">microtime</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
<p>Thats how it looks like:</p>
<div class="dean_ch" style="white-space: nowrap;"><span class="re0">$code_starts</span> = <a href="http://www.php.net/microtime"><span class="kw3">microtime</span></a><span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&#8230;<br />
&lt;some code&gt;<br />
&#8230;<br />
<span class="re0">$code_ends</span> = <a href="http://www.php.net/microtime"><span class="kw3">microtime</span></a><span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$execution_time</span> = <span class="re0">$code_ends</span> &#8211; <span class="re0">$code_starts</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Done in: &quot;</span>.<span class="re0">$execution_time</span>.<span class="st0">&quot; s&quot;</span>;</div>
<p>Have a nice <a href="http://en.wikipedia.org/wiki/Bottleneck">bottleneck </a> finding!</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/php-exec-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website speed check</title>
		<link>http://experience.masalas.org/web/website-speed/</link>
		<comments>http://experience.masalas.org/web/website-speed/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 16:22:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/website-speed-check-optimization.html</guid>
		<description><![CDATA[
If your website, blog or portal gets bigger with time, or has/will have huge traffic, you need to find its weakest spots.
This free online tool is very useful, when speach comes to speed. http://tools.pingdom.com/fpt/.
Pingdom tools &#8211; a free webtool, which checks your website&#8217;s loading speeds. It shows which javascript/image/css loads longest and so on.
]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><img class="aligncenter" src="http://experience.masalas.org/wp/wp-content/uploads/load_time.png" alt="website speed checker" /></p>
<p>If your website, blog or portal gets bigger with time, or has/will have huge traffic, you need to find its weakest spots.<br />
This free online tool is very useful, when speach comes to speed. <a href="http://tools.pingdom.com/fpt/">http://tools.pingdom.com/fpt/</a>.</p>
<p>Pingdom tools &#8211; a free webtool, which checks your website&#8217;s loading speeds. It shows which javascript/image/css loads longest and so on.</p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/website-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimize MySQL queries</title>
		<link>http://experience.masalas.org/web/optimize-mysql/</link>
		<comments>http://experience.masalas.org/web/optimize-mysql/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 11:14:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/Optimising-MySQL-queries.html</guid>
		<description><![CDATA[MySQL is powerfull enough to make almost anything in web development. Even wikipedia uses it. Of course, I am not guru to understand and make such a big system. But even most of small projects need optimisation. By optimising MySQL queries, you get faster responses from server, smaller database size etc. Size does matter when [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL is powerfull enough to make almost anything in web development. Even <a href="http://www.wikipedia.com">wikipedia</a> uses it. Of course, I am not guru to understand and make such a big system. But even most of small projects need optimisation. By optimising MySQL queries, you get faster responses from server, smaller database size etc. Size does matter when you use MySQL databases on shared hostings.</p>
<p>There is small article on MySQL optimisation in <a href="http://linuxformat.co.uk/wiki/index.php/PHP_-_Optimising_MySQL_queries">linuxformat.co.uk wiki</a></p>
<p>What I did learn from this article:</p>
<ul>
<li>
<div class="MarkCode">SELECT password FROM users WHERE Username = &#8216;myuser&#8217; LIMIT 1;</div>
<p>Always select just fields which you will need in current situation, <small>SELECT * &#8230;</small> is not good in most cases. If field by which you filter data, is unique, use <small>LIMIT 1</small> statement.</li>
<li>Create fields with as small data types as it is possible. Good example with age field. It is better to use TINYINT UNSIGNED than INT (who lives negative years and reaches 255 year old? )</li>
<li>When database has lots of data, you can check is your schemata is optimised with query:
<div class="MarkCode">SELECT * FROM table PROCEDURE ANALYSE();</div>
<p>It will show you  optimal field data type by analyzing records (look at Optimal_fieldtype column)</li>
<li>Add Index to most searchable columns:
<div class="MarkCode">ALTER TABLE tablename ADD INDEX name(column)</div>
<p>MySQL Index is similar to book&#8217;s index.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/optimize-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php-XML</title>
		<link>http://experience.masalas.org/web/php-xml/</link>
		<comments>http://experience.masalas.org/web/php-xml/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 16:19:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://experience.masalas.org/Using-XML-php-easy-way.html</guid>
		<description><![CDATA[If you ever plan to use XML with PHP there is good XMLParser class written by Adam A Flynn. You can get  it for PHP4 and PHP5 from his page
http://www.phppal.com/xml/doc.php. There are some examples, so it wont be very hard to understand.
UPDATE: seemes, that www.phppal.com is dead allready :/
You can download the class from [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever plan to use <a href="http://en.wikipedia.org/wiki/XML" target="_blank">XML</a> with PHP there is good XMLParser class written by Adam A Flynn. You can get  it for PHP4 and PHP5 from his page<br />
<a style="text-decoration: line-through;" href="http://www.phppal.com/xml/doc.php" target="_blank">http://www.phppal.com/xml/doc.php</a>. There are some examples, so it wont be very hard to understand.</p>
<p><strong>UPDATE: seemes, that www.phppal.com is dead allready :/</strong></p>
<p>You can download the class from my page: <a href="/wp-content/uploads/XMLParser.zip">XMLParser.zip</a><br />
To use this class simply copy it in /usr/lib/php directory or if you dont have root permissions, copy in the same folder as your php script.</p>
<p>I had some problems at first, because I was not familiar with data structure after parsing, so I used such code to view, how objects and arrays was formed:</p>
<div class="dean_ch" style="white-space: nowrap;">Parse<span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">//Print all xml children array structure</span><br />
<a href="http://www.php.net/print_r"><span class="kw3">print_r</span></a><span class="br0">&#40;</span><span class="re0">$parser</span>-&gt;<span class="me1">document</span>-&gt;<span class="me1">tagChildren</span><span class="br0">&#41;</span>;</div>
<p>That&#8217;s all. It is much simplier than i thought to work with XML :)<br />
More info at php documentation: <a href="http://lt.php.net/manual/en/ref.xml.php" target="_blank">http://lt.php.net/manual/en/ref.xml.php</a></p>
<p><strong>UPDATE: As PHP5 has much better XML support, you can use now it&#8217;s features Read on <a href="http://devzone.zend.com/article/2387">Zend article</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://experience.masalas.org/web/php-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
