<?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>JohnForHire.com - Programmer For Hire - Brilliance with no hidden fees! &#187; Blog</title>
	<atom:link href="http://johnforhire.com/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnforhire.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 24 May 2010 21:27:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Uploading &amp; .htaccess</title>
		<link>http://johnforhire.com/2009/12/php-uploading-htaccess/</link>
		<comments>http://johnforhire.com/2009/12/php-uploading-htaccess/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 19:06:44 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[.htaccess]]></category>

		<guid isPermaLink="false">http://johnforhire.com/?p=170</guid>
		<description><![CDATA[For the senior developers, this is common knowledge in your tool box.  For others, it can be quite a hassle to get your app working.  Throw in some GoDaddy or similiar hosting service and you&#8217;ve got a nightmare.
Here are a couple examples to help you with uploading in PHP..
Open your .htaccess file or [...]]]></description>
			<content:encoded><![CDATA[<p>For the senior developers, this is common knowledge in your tool box.  For others, it can be quite a hassle to get your app working.  Throw in some GoDaddy or similiar hosting service and you&#8217;ve got a nightmare.</p>
<p>Here are a couple examples to help you with uploading in PHP..</p>
<p>Open your .htaccess file or create one in a txt editor now.  Add the below to the bottom of your .htaccess:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">php_value upload_max_filesize 20M  <span style="color: #666666; font-style: italic;">//Add your max upload size here</span>
php_value post_max_size 20M <span style="color: #666666; font-style: italic;">//this sets the filesize limit while using POST in your form</span></pre></div></div>

<p>For those of you with sluggish servers, shared hosting or large files, it may benefit you to up the maximum execution time so that the upload doesn&#8217;t timeout during the process</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">php_value max_execution_time <span style="color: #cc66cc;">200</span>
php_value max_input_time <span style="color: #cc66cc;">200</span></pre></div></div>

<p>That&#8217;s a wrap, there are plenty of other resources available on php and .htaccess, just google it.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnforhire.com/2009/12/php-uploading-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileZilla Server User Management through PHP API</title>
		<link>http://johnforhire.com/2009/09/filezilla-server-user-management-through-php-api/</link>
		<comments>http://johnforhire.com/2009/09/filezilla-server-user-management-through-php-api/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 04:13:32 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[FileZilla Server]]></category>

		<guid isPermaLink="false">http://dev.dicelabs.com/JFH/?p=130</guid>
		<description><![CDATA[This is the start of what is going to be a small series on developing a modern approach to managing FileZilla through an API.  Primarily, I will develop in PHP and will eventually port the code into Ruby.
It really is a work in progress and my primary goal is to get it to a point [...]]]></description>
			<content:encoded><![CDATA[<p>This is the start of what is going to be a small series on developing a modern approach to managing FileZilla through an API.  Primarily, I will develop in PHP and will eventually port the code into Ruby.</p>
<p>It really is a work in progress and my primary goal is to get it to a point where I can manage users through an API.  I chose XML to start with and will also port into JSON at a later time.  It is important to note that while I prefer the *nix system, I needed to set this up on a MS box, not that I wanted to, believe me.  The code is so rough it is bound to have some issues, if you see anything worth noting, please point it out!</p>
<p>Also, this work is to be released under the GPL so please feel free to use it as you like and give credit where credit is due.<br />
<span id="more-130"></span></p>
<p>To start, lets load the FileZilla server.xml file and parse the XML:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//XML location</span>
<span style="color: #000088;">$serverFile</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;FileZilla server.xml&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//New XML Object</span>
<span style="color: #000088;">$xmlobj</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXMLElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$serverFile</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>At the moment, this will add a user based on pre-defined settings stored in an array, so lets set the variables and add the new children to the parent node:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$entryUserOption</span><span style="color: #339933;">=</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Pass&quot;</span><span style="color: #339933;">=&gt;</span>	<span style="color: #000088;">$pid</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;Group&quot;</span><span style="color: #339933;">=&gt;</span>					<span style="color: #0000ff;">&quot;clients&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;Bypass server userlimit&quot;</span><span style="color: #339933;">=&gt;</span>	        <span style="color: #0000ff;">&quot;2&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;User Limit&quot;</span><span style="color: #339933;">=&gt;</span>			                <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;IP Limit&quot;</span><span style="color: #339933;">=&gt;</span>					<span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;Enabled&quot;</span><span style="color: #339933;">=&gt;</span>					<span style="color: #0000ff;">&quot;2&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;Comments&quot;</span><span style="color: #339933;">=&gt;</span>				        <span style="color: #0000ff;">&quot;none&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;ForceSsl&quot;</span><span style="color: #339933;">=&gt;</span>				        <span style="color: #0000ff;">&quot;2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">////////////////////////////////////////////////////////</span>
<span style="color: #000088;">$entryPermOption</span><span style="color: #339933;">=</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FileRead&quot;</span><span style="color: #339933;">=&gt;</span>	<span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;FileWrite&quot;</span><span style="color: #339933;">=&gt;</span>					        <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;FileDelete&quot;</span><span style="color: #339933;">=&gt;</span>				                <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;FileAppend&quot;</span><span style="color: #339933;">=&gt;</span>				        <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;DirCreate&quot;</span><span style="color: #339933;">=&gt;</span>				                <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;DirDelete&quot;</span><span style="color: #339933;">=&gt;</span>				                <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;DirList&quot;</span><span style="color: #339933;">=&gt;</span>					        <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;DirSubdirs&quot;</span><span style="color: #339933;">=&gt;</span>				                <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;IsHome&quot;</span><span style="color: #339933;">=&gt;</span>					        <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">&quot;AutoCreate&quot;</span><span style="color: #339933;">=&gt;</span>				        <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$xmlobj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Users</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;User&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Name&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$uid</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;">$entryUserOption</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	    <span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Option&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Name&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>So we now have the <strong>Users</strong> node created, nested a child node called <strong>User</strong> and iterated through the options array and set the <strong>Option</strong> node attributes.  Next up, create the remaining children nodes for <strong>User</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;IpFilter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Disallowed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Allowed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Permissions&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$option</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Permission&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$option</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Dir&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$homeDir</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;">$entryPermOption</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000088;">$option</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Option&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$option</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Name&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SpeedLimits&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DlType&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DlLimit&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;10&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$option</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Download&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$option</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Upload&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Last but not least, lets print the XML so we can see what we are looking at:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">print</span> <span style="color: #000088;">$xmlobj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">asXML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I&#8217;m not going to put the entire contents of the FileZilla server.xml file but you should have something similar to the below:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;User</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;testuser&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Pass&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>******<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Group&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>clients<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Bypass server userlimit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;User Limit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;IP Limit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Enabled&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Comments&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ForceSsl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IpFilter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Disallowed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Allowed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IpFilter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Permissions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Permission</span> <span style="color: #000066;">Dir</span>=<span style="color: #ff0000;">&quot;C:\ftp\clients\testuser&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FileRead&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FileWrite&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FileDelete&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FileAppend&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DirCreate&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DirDelete&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DirList&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DirSubdirs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;IsHome&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Option</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AutoCreate&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Permission<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Permissions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;SpeedLimits</span> <span style="color: #000066;">DlType</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">DlLimit</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">ServerDlLimitBypass</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">UlType</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">UlLimit</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">ServerUlLimitBypass</span>=<span style="color: #ff0000;">&quot;2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Download</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Upload</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/SpeedLimits<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/User<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The above code only grabs the XML file adds a new child and prints the XML.  My next post will include the code to then save to FileZilla&#8217;s config file and reload at runtime.  Again, feel free to contribute or comment..</p>
]]></content:encoded>
			<wfw:commentRss>http://johnforhire.com/2009/09/filezilla-server-user-management-through-php-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
