<?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>PHP Scripts and Programming&#187; Webmaster Tools</title>
	<atom:link href="http://www.warkensoft.com/category/webmaster-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warkensoft.com</link>
	<description>PHP scripts, programs and downloads for use by webmasters around the world.</description>
	<lastBuildDate>Thu, 22 Apr 2010 16:14:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Aptana and Eclipse Mouse Click Problems</title>
		<link>http://www.warkensoft.com/2010/01/aptana-and-eclipse-mouse-click-problems/</link>
		<comments>http://www.warkensoft.com/2010/01/aptana-and-eclipse-mouse-click-problems/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 20:21:49 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Webmaster Resources]]></category>
		<category><![CDATA[Webmaster Tools]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/?p=362</guid>
		<description><![CDATA[Recently, both the Aptana and Eclipse IDE&#8217;s have been giving me mouse clicking problems but I finally found the solution.  To fix the problem you will need to do the following:

Create a new empty file called aptana.sh that you will use to launch Aptana.  I store my install of Aptana in /home/username/Applications/aptana so I [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, both the Aptana and Eclipse IDE&#8217;s have been giving me mouse clicking problems but I finally found the solution.  To fix the problem you will need to do the following:</p>
<ol>
<li>Create a new empty file called <strong>aptana.sh</strong> that you will use to launch Aptana.  I store my install of Aptana in <strong>/home/username/Applications/aptana</strong> so I created the launch script in <strong>/home/username/Applications/aptana.sh</strong>.</li>
<li>Put the following code in the empty file and save it.  It will become what is called a wrapper script for launching the Aptana application.  Change the paths to match your environment.
<pre>#!/bin/sh
export GDK_NATIVE_WINDOWS=1
/home/username/Applications/aptana/AptanaStudio</pre>
</li>
<li>Make the script executable.  You can do this by right-clicking it in gnome and selecting <strong>Properties -&gt; Permissions -&gt; Allow executing file as program</strong>.  For the purists: <strong>chmod +x /home/username/Applications/aptana.sh</strong></li>
<li>Create a launch script.  For the sake of simplicity, I create a launch script for it on my desktop by right-clicking on the desktop and selecting Create Launcher.<br />
<strong>Name: Aptana<br />
Command: /home/username/applications/aptana.sh</strong> (browse to and select the script you created)</li>
</ol>
<p>You should be able to use a very similar setup to fix mouse clicks in Eclipse as well.  Just change the paths and filenames where appropriate.  Keep in mind that the application for Aptana is called <strong>AptanaStudio</strong> whereas in Eclipse it is simply called <strong>eclipse</strong>.</p>
<p>You can now test your script by double clicking the launcher or running the shell script you created.  The mouse clicking problems should be fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2010/01/aptana-and-eclipse-mouse-click-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Captcha Insanity?</title>
		<link>http://www.warkensoft.com/2009/06/captcha-insanity/</link>
		<comments>http://www.warkensoft.com/2009/06/captcha-insanity/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 17:11:26 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Webmaster Tools]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/?p=232</guid>
		<description><![CDATA[So, normally as a programmer, I appreciate the use CAPTCHAs to prevent spam bots from emailing me random junk, but this is when it get&#8217;s a little excessive&#8230;

Originally posted on my friend&#8217;s website here.
]]></description>
			<content:encoded><![CDATA[<p>So, normally as a programmer, I appreciate the use CAPTCHAs to prevent spam bots from emailing me random junk, but this is when it get&#8217;s a little excessive&#8230;</p>
<p><img class="alignnone size-medium wp-image-236" title="secur" src="http://www.warkensoft.com/wp-content/uploads/2009/06/secur-300x200.gif" alt="secur" width="300" height="200" /></p>
<p><a href="http://www.kimu.ca/?p=1347">Originally posted on my friend&#8217;s website here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2009/06/captcha-insanity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Object Unit Testing</title>
		<link>http://www.warkensoft.com/2009/06/php-object-unit-testing/</link>
		<comments>http://www.warkensoft.com/2009/06/php-object-unit-testing/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 16:15:22 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>
		<category><![CDATA[Webmaster Tools]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/?p=228</guid>
		<description><![CDATA[I recently found a PHP tool that might actually be useful to a lot of developers in helping to keep their PHP code clean and help with bug tracking and diagnosis.  With PHP 5, we now have the ability to delve quite heavily into OOP based scripting.  This basically means creating PHP code as Objects [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found a PHP tool that might actually be useful to a lot of developers in helping to keep their PHP code clean and help with bug tracking and diagnosis.  With PHP 5, we now have the ability to delve quite heavily into OOP based scripting.  This basically means creating PHP code as Objects instead of spaghetti code.  The tool I found recently is a simple framework for testing your newly created PHP objects.  It is called <a href="http://www.lastcraft.com/overview.php">SimpleTest</a>.</p>
<p>Basically, you can build your PHP objects and use this tool to create test cases in order to ensure that future upgrades don&#8217;t break existing code.  This is called Unit Testing.  Check it out.  I&#8217;d love to know how you like it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2009/06/php-object-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FormContact 1.1 with PHP5 Support</title>
		<link>http://www.warkensoft.com/2008/06/formcontact-11-with-php5-support/</link>
		<comments>http://www.warkensoft.com/2008/06/formcontact-11-with-php5-support/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 19:42:24 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Webmaster Tools]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/?p=64</guid>
		<description><![CDATA[I have recently upgraded FormContact to version 1.1 which now has much better built-in PHP5 support.
The FormContact 1.1 system will allow you to handle most Form-To-Email functions required by a website. It can be set up to take all the submitted form data and convert it to a readable email format. It can be customized [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently upgraded FormContact to version 1.1 which now has much better built-in PHP5 support.</p>
<p>The FormContact 1.1 system will allow you to handle most Form-To-Email functions required by a website. It can be set up to take all the submitted form data and convert it to a readable email format. It can be customized to send users to a &#8220;thank you&#8221; page once the form data has been filled out, and certain form fields can be marked as being required in order for the form to be completed.</p>
<p>It also has the added ability for sending an <strong>automated response</strong> to the person who fills out the form. Different responses can be used for different forms, and can even be personalized to the user, based on form fields they enter.</p>
<p><a href="http://www.warkensoft.com/about-me/">Click here to read more</a> about the person who created these resources and is offering them for you to use.</p>
<p><strong>Requirements:</strong> PHP 4 or 5</p>
<p><strong>Features:</strong><br />
<em>Form Submission</em><br />
Convert form submitted data to an email which can be received by the webmaster.</p>
<p><em>Destination Email</em><br />
Set one or multiple recipients of the email generated from the form data.</p>
<p><em>Required Fields</em><br />
The form can be set up to require certain fields to be filled out before a successful submission can be made.</p>
<p><em>Followup URL</em><br />
Send your website visitors to a &#8220;Thank You&#8221; page once they have successfully filled out the form on your website.</p>
<p><em>Automated Response</em><br />
In addition to emailing the form data to the webmaster, the FormContact system can create a customized email response to be set back to the user who filled out the form, based on what data they have entered into the form. Excellent for followup of clients, adding that small extra touch of connection to let them know that they have been heard, and will be contacted further shortly.</p>
<p><strong>Download: </strong><a href="http://www.warkensoft.com/dl.php?filename=form_contact_plus.zip">Click Here</a></p>
<h4>Website Hosting</h4>
<p>If you&#8217;re looking for somewhere to host your own web creation, we would highly recommend <a href="http://phpads.warkensoft.com/adclick.php?bannerid=7&amp;zoneid=9&amp;source=&amp;dest=http://www.warkensoft.com/2006/10/hosting-coupons/&amp;ismap="><strong>DreamHost</strong></a>. Offering 167 Gig&#8217;s of storage space, 1.6 TB of bandwidth, PHP, MySQL and a host of other features, they&#8217;ll most likely be more than adequate for your website needs. And with a 97 day money back guarantee you can&#8217;t go wrong! <a href="http://phpads.warkensoft.com/adclick.php?bannerid=7&amp;zoneid=9&amp;source=&amp;dest=http://www.warkensoft.com/2006/10/hosting-coupons/&amp;ismap="><strong>Visit DreamHost for more information about what they offer</strong></a>.</p>
<p>And now, we&#8217;re offering $50 OFF coupons as a special benefit to our website visitors.  <a href="http://www.warkensoft.com/2006/10/hosting-coupons/">Click here for more information</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2008/06/formcontact-11-with-php5-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Website Subversion Backup</title>
		<link>http://www.warkensoft.com/2008/04/website-subversion-backup/</link>
		<comments>http://www.warkensoft.com/2008/04/website-subversion-backup/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 00:00:45 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>
		<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Webmaster Tools]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[website backups]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/?p=61</guid>
		<description><![CDATA[As a PHP coder and web developer, I have recently discovered and fallen in love with a tool which helps to keep my source code safely backed up.  This tool is called Subversion and &#8220;it is used to maintain current and historical versions of files such as source code, web pages, and documentation.&#8221; (1) [...]]]></description>
			<content:encoded><![CDATA[<p>As a PHP coder and web developer, I have recently discovered and fallen in love with a tool which helps to keep my source code safely backed up.  This tool is called <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a> and &#8220;it is used to maintain current and historical versions of files such as source code, web pages, and documentation.&#8221; (<a href="#references">1</a>)  In simple terms, it allows you to back up your files and keeps a history of all the versions of files that you send to it.</p>
<p>This is VERY useful when doing PHP development because as you develop your application you can commit versions of the files to the Subversion (SVN) repository and it will keep track of all the changes you have made.  If necessary, you can even revert back to older versions.</p>
<p>One of the difficulties that I have run into while doing website development is how to keep the live remote website synchronized with my local working copy.  This is especially true of WordPress installations where editors may be uploading new pictures or documents to the site on a daily basis.  If you are not constantly downloading the latest copy of the website, your local copy will be out-of-date and may cause problems in your development.</p>
<p><strong>Subversion to the Rescue:</strong></p>
<p>However, I have come up with a relatively simple solution to this problem, which utilizes the controls within Subversion, to both back up the data on the LIVE website, as well as providing version control for all the site data as a whole.  For the sake of simplicity, I will be using a WordPress website as my example, but the concepts here could be applied to essentially any website.</p>
<p>One of the useful features of Subversion is the ability to run what they refer to as &#8220;hook scripts&#8221; at different points in the versioning process.  For example, an SVN repository can be configured to run a set of scripts directly after any data is &#8220;committed&#8221; to it. (sending data to the repository is called &#8220;committing&#8221; the data)  For this example, this is exactly the functionality we are going to be using.</p>
<p>Before I go any further though, let&#8217;s go over some of the requirements for setting up a website and subversion repository in this way.</p>
<p><span id="more-61"></span><strong>WARNING: The following tutorial could seriously damage/destroy your website and/or server if you don&#8217;t know what you&#8217;re doing.  We take no responsibility for any problems which may occur from following these instructions. </strong></p>
<p><strong>We HIGHLY recommend that you not employ these ideas on a LIVE webserver until you have thoroughly tested things in a development environment and fully understand how things work. Proceed at your own risk.  You have been warned!<br />
</strong></p>
<p><strong>Requirements:</strong></p>
<ol>
<li>You will need shell access to the server.</li>
<li>The subversion repository must be on the same server as the website, and you will need to be able to run subversion commands on the server.</li>
<li>The user which runs the subversion repository, must also have access to add and remove files from the live website.</li>
</ol>
<p><strong>Terminology:</strong></p>
<p>Subversion Repository (SVN): The subversion repository which will contain all the website data.  Needs to be located on the same server as the website and have access to the website&#8217;s files.</p>
<p>Local Working Copy (LWC): Term used to refer to the Working Copy of the SVN repository stored on your personal computer.</p>
<p>Remote Working Copy (RWC): You will need to be able to set up a remote working copy of the SVN repository on the same server as the website and SVN.</p>
<p><strong>Setting it Up:</strong></p>
<p>The first step in setting up a website to use SVN in this way, is to set up the SVN repository itself.  I will not go into detail on how to set up an SVN repository, but for the sake of the article, let&#8217;s assume we can create the SVN repository at the path &#8220;/svnRepository/&#8221; on the remote server.  We will create the subversion repository by typing the following on the remote server shell.</p>
<blockquote><p>svnadmin create /svnRepository</p></blockquote>
<p>The next important piece of the puzzle we need is the Remote Working Copy.  Let&#8217;s assume that we can store the RWC at the path &#8220;/remoteWorkingCopy/&#8221; on the remote server.  To do this, we will enter the following shell command:</p>
<blockquote><p>svn checkout file:///svnRepository/ /remoteWorkingCopy/</p></blockquote>
<p>Finally, we will make the assumption that you already have a website set up on the remote server, and it is located at the path &#8220;/www/&#8221;.</p>
<p>In order to set this up properly you will need to ensure that you can connect to the SVN repository.  Though I will not go into the details of how to use Subversion here in this article, you need to be able to check out a copy of the remote SVN repository to your local machine.</p>
<p><strong>Synchronizing the Website with SVN:</strong></p>
<p>The next step in this process is to synchronize the current website with the SVN repository.  To do this, we will be working on the server and will need to copy all the files from the website into the Remote Working Copy.  To do this you would enter the following commands on the remote shell:</p>
<blockquote><p>cp -r /www/* /remoteWorkingCopy/</p>
<p>cp -r /www/.ht* /remoteWorkingCopy/</p></blockquote>
<p>These two commands should copy all files from the website over to the RWC.  Now, unfortunately, the RWC doesn&#8217;t yet know what to do with these files, so we have to instruct it that all the files should be added to the SVN repository.  We would do this with the following command:</p>
<blockquote><p>svn stat /remoteWorkingCopy/ | grep ^? | sed s/^?// | xargs -r -i svn add &#8220;{}&#8221;</p></blockquote>
<p>As indicated above, this command should prepare all files you have just copied to the RWC to be committed to the SVN repository.  The final step is to run the actual &#8220;commit&#8221; command, and you would do that as so:</p>
<blockquote><p>svn commit -m &#8220;Website Backup&#8221; /remoteWorkingCopy/</p></blockquote>
<p>This command will go through the RWC and send all the new files you just added to the SVN repository where they are versioned and backed up.</p>
<p><strong>Set Up Automatic Website Updates on POST-COMMIT:</strong></p>
<p>We now have copy of the website stored in the SVN repository, as well as in the Remote Working Copy, but unless we take further steps, these filesystems will very shortly be out-of-date with the LIVE website.  We also don&#8217;t yet have a way to get changes that we make to the SVN files back onto the website.</p>
<p>In order to do this we will need to set up a POST-COMMIT hook script.  This is a script in the SVN repository which runs after every time a commit is called.  In order to install the script, simply place it in your /svnRepository/hooks/ folder and make it writable.  The script is as follows:</p>
<blockquote><p>#!/bin/sh</p>
<p># POST-COMMIT HOOK</p>
<p># Website BasePath<br />
BASEPATH=&#8221;/www&#8221;</p>
<p># Repository Path<br />
REPOSITORY=&#8221;file:///svnRepository&#8221;</p>
<p># Remote Working copy<br />
LOCALWC=&#8221;/remoteWorkingCopy/&#8221;</p>
<p>REPOS=&#8221;$1&#8243;<br />
REV=&#8221;$2&#8243;</p>
<p># Update the current working copy<br />
echo &#8220;Updating the working copy &#8221; $LOCALWC<br />
svn update $LOCALWC</p>
<p># Propogate deletes, adds and modifies from the SVN repository to the website.<br />
echo &#8220;Doing Deletes!&#8221;<br />
svn log -qvr $REV $LOCALWC | grep &#8220;^   D&#8221; | sed &#8220;s/^   D //&#8221; | sed -r &#8220;s# \(.+\)##&#8221; | xargs -r -i rm -rf $BASEPATH{}</p>
<p>echo &#8220;Doing Adds!&#8221;<br />
svn log -qvr $REV $LOCALWC | grep &#8220;^   A&#8221; | sed &#8220;s/^   A //&#8221; | sed -r &#8220;s# \(.+\)##&#8221; | xargs -r -i svn export &#8211;force $LOCALWC{} $BASEPATH{}</p>
<p>echo &#8220;Doing Mods!&#8221;<br />
svn log -qvr $REV $LOCALWC | grep &#8220;^   M&#8221; | sed &#8220;s/^   M //&#8221; | sed -r &#8220;s# \(.+\)##&#8221; | xargs -r -i svn export &#8211;force $LOCALWC{} $BASEPATH{}</p>
<p># Copy current website files to current working copy<br />
echo &#8220;Copying current website files to working copy&#8221;<br />
cp -r $BASEPATH/* $LOCALWC<br />
cp -r $BASEPATH/.ht* $LOCALWC</p>
<p># Automatically add all added and changed files from the website to the SVN repository.<br />
echo &#8220;Adding and changing files&#8221;<br />
svn stat $LOCALWC | grep ^? | sed s/^?// | xargs -r -i svn add &#8220;{}&#8221;</p>
<p># Commit changes from working copy to SVN Repository<br />
echo &#8220;Running commit&#8221;<br />
svn commit -m &#8220;Website Backup&#8221; $LOCALWC</p></blockquote>
<p>When you put this script in your /svnRepository/hooks folder and make it executable, the script will be run every time you commit something to the repository.  Here is an outline of what it does:</p>
<p><strong>Steps in Detail on Commit:</strong></p>
<ol>
<li>User runs UPDATE on their local machine to get latest info from repository</li>
<li>COMMIT is called</li>
<li>UPDATE the remote working copy.</li>
<li>Check svn log for deleted files in the Remote Working Copy and remove them from the website.</li>
<li>Check svn log for added files and export them to the website.</li>
<li>Check svn log for modified files and export them to the website.</li>
<li>Copy all live website files to Remote Working Copy.</li>
<li>Add all new files to be versioned in the RWC.</li>
<li>Commit all additions and changes from the RWC to the SVN repository.</li>
<li>The next time the user runs an update, it would get the latest files from the repository which should be synced to the website.</li>
</ol>
<p><strong>Conclusion:</strong></p>
<p>The end result of this process is that when changes are made on your local machine and committed to the SVN repository, the script will run, it will synchronize the website with the RWC and then will deploy your changes TO the website.</p>
<p>I hope you have found this tutorial useful.  As mentioned above, be very careful as you work through the process of running these scripts and commands, as you could potentially cause major breakdowns on your website.  <strong>Again, we take NO RESPONSIBILITY for any problems which may result from following this tutorial.  Follow these instructions at your own risk.</strong></p>
<p>I would love to hear any feedback you may have about this article.  I would also like to hear from developers who may have more experience with this topic than I do and would be willing to make suggestions for improvement.</p>
<p><a id="references" name="references"><strong>References:</strong></a></p>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion (software)</a> &#8211; From Wikipedia, the free encyclopedia</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2008/04/website-subversion-backup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Webmaster Tool &#8211; The Regular Expression Editor</title>
		<link>http://www.warkensoft.com/2007/06/new-webmaster-tool-the-regular-expression-editor/</link>
		<comments>http://www.warkensoft.com/2007/06/new-webmaster-tool-the-regular-expression-editor/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 01:00:59 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Webmaster Resources]]></category>
		<category><![CDATA[Webmaster Tools]]></category>

		<guid isPermaLink="false">http://www.warkensoft.com/2007/06/new-webmaster-tool-the-regular-expression-editor/</guid>
		<description><![CDATA[WarkenSoft Productions is proud to announce the development of a new tool for use on our site.  The Regular Expression editor will allow you to test and edit any regular expressions that you have been struggling with to develop.  Made available for free to our visitors, we hope you enjoy the tool and [...]]]></description>
			<content:encoded><![CDATA[<p>WarkenSoft Productions is proud to announce the development of a new tool for use on our site.  <a href="http://www.warkensoft.com/products/regular-expression-editor-and-tester/"><strong>The Regular Expression editor</strong></a> will allow you to test and edit any regular expressions that you have been struggling with to develop.  Made available for free to our visitors, we hope you enjoy the tool and find it to be useful.</p>
<p>If you have any suggestions for improvements or comments about it, feel free to leave them in the comments area below.  Also, we&#8217;re always on the look out for good regular expressions, so if you feel that you have one or a few that might be useful to the other visitors to this site, feel free to mention them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warkensoft.com/2007/06/new-webmaster-tool-the-regular-expression-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
