<?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"
	>

<channel>
	<title>LAMPdocs: Linux, Apache, MySQL, PHP</title>
	<atom:link href="http://www.lampdocs.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com/blog</link>
	<description>Linux, Apache, MySQL, PHP: Docs, Tricks and Secrets</description>
	<pubDate>Thu, 28 Aug 2008 14:36:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Simple Plugin For Wordpress to Show Adsense</title>
		<link>http://www.lampdocs.com/blog/2008/08/28/simple-plugin-for-wordpress-to-show-adsense/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/28/simple-plugin-for-wordpress-to-show-adsense/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:36:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Wordpress Ideas]]></category>

		<category><![CDATA[easy adsense plugin wordpress]]></category>

		<category><![CDATA[wordpress adsense]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=151</guid>
		<description><![CDATA[Now my blog has one hundred posts. I think my knowledge is worth some money that&#8217;s why I decided to add some Ads. All I know is shared absolutely for free and I don&#8217;t like any donations. I think Adsense is good enough to monetize my blog. My earnings will be announced; I don&#8217;t know [...]]]></description>
			<content:encoded><![CDATA[<p>Now my blog has one hundred posts. I think my knowledge is worth some money that&#8217;s why I decided to add some Ads. All I know is shared absolutely for free and I don&#8217;t like any donations. I think Adsense is good enough to monetize my blog. My earnings will be announced; I don&#8217;t know what will be the revenue.</p>
<p>I&#8217;ve been searching for a good yet simple Wordpress plugin, that could allow to add ads to my blog. I&#8217;ve tried several, but none of them seemed to be good for my needs. After some experiments I&#8217;ve chosen<br />
<a href="http://wordpress.org/extend/plugins/all-in-one-adsense-and-ypn/">All in One Adsense and YPN</a>. It was exactly what I needed.</p>
<p>This plugin has only one file, that&#8217;s good enough as it is simple to delete it if you decide you don&#8217;t need it. The second advantage is the easy setup. Basically, all you need is your adsense publisher ID; all other settings may be left as they are; you need just to select the number of ad blocks and you&#8217;re ready to go.  Here is how it looks in my browser:</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/adsense.jpg"><img class="alignnone size-medium wp-image-152" title="adsense" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/adsense-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Everything is clear and easy to set up. I didn&#8217;t think adding ads is such an easy task! By the way, plugins I&#8217;ve tried were found <a href="http://madeforadsense.net/2008/04/complete-list-of-wordpress-adsense-plugin/">here</a>:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/28/simple-plugin-for-wordpress-to-show-adsense/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Protect a Folder Using .htaccess From Command Line</title>
		<link>http://www.lampdocs.com/blog/2008/08/28/how-to-protect-a-folder-using-htaccess-from-command-line/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/28/how-to-protect-a-folder-using-htaccess-from-command-line/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 13:25:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[create password file ssh]]></category>

		<category><![CDATA[htaccess shell password]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=150</guid>
		<description><![CDATA[We do often meet password protected directories on the Web. This is usually used to hide some information that should not be visible to all site users. Most common is .htaccess protection, that allows you to restrict users at Apache level and is also knows as http authentification. Today I will tell you how to [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 10]></p>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Обычная таблица";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<p><![endif]--><span lang="EN-US">We do often meet password protected directories on the Web. This is usually used to hide some information that should not be visible to all site users. Most common is .htaccess protection, that allows you to restrict users at Apache level and is also knows as http authentification. Today I will tell you how to protect your directory using command line. </span></p>
<p><span lang="EN-US">As usually we need root access to the server and need to go to the folder which is waiting to be protected. First of all we need to create an .htaccess file that should contain the information that authentification is required to access this folder. </span>The most common sample comes below:</p>
<p><strong><span lang="EN-US">AuthGroupFile /dev/null<br />
AuthName &#8220;Closed User Group&#8221;<br />
AuthType Basic<br />
AuthUserFile /path_to_htpasswd_file/.htpasswd<br />
require valid-use</span></strong><span lang="EN-US">r</span></p>
<p><span lang="EN-US">Usually <strong>.htaccess</strong> and <strong>.htpasswd</strong> files are located in the same folder, but you can move <strong>.htpasswd</strong> anywhere you like: you will just need to point to its absolute location in <strong>.htaccess</strong>.  Then go to the directory where you&#8217;re planning to put your<strong> .htpasswd</strong> file. </span></p>
<p><span lang="EN-US">Now we need to have username and password - that&#8217;s enough. The following command will create your .htpasswd file with login data so you can use it immediately. </span></p>
<p><strong><span lang="EN-US"> htpasswd -bcm .htpasswd user password</span></strong></p>
<p><span lang="EN-US">You can read more about this command at </span><a href="http://httpd.apache.org/docs/2.0/programs/htpasswd.html"><span lang="EN-US">Apache Site</span></a><span lang="EN-US">. But this command will help you to create a password file without any specific knowledge. </span></p>
<p><span lang="EN-US">Please, note that <strong>.htpasswd</strong> is just the file name: you&#8217;re welcome to store your passwords in the files with any file names, but it would be better if it is started with a dot and if this file is stored in the directory that is not accessible from web. </span></p>
<p><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/28/how-to-protect-a-folder-using-htaccess-from-command-line/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Install Zip Functions Support For PHP</title>
		<link>http://www.lampdocs.com/blog/2008/08/25/how-to-install-zip-functions-support-for-php/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/25/how-to-install-zip-functions-support-for-php/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:10:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Configuration]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[add zip support php]]></category>

		<category><![CDATA[how to enable zip functions php]]></category>

		<category><![CDATA[php zip installation]]></category>

		<category><![CDATA[php5 zip support]]></category>

		<category><![CDATA[php5 zlib]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=149</guid>
		<description><![CDATA[Using zip files is a common practice for web. Zip archives are very useful as they are supported by all major operating systems and don&#8217;t require any special software. XP and Vista have the embedded support of this file format, you won&#8217;t also have problems opening these files in Linux. You can also work with [...]]]></description>
			<content:encoded><![CDATA[<p>Using zip files is a common practice for web. Zip archives are very useful as they are supported by all major operating systems and don&#8217;t require any special software. XP and Vista have the embedded support of this file format, you won&#8217;t also have problems opening these files in Linux. You can also work with these files in PHP. in order to do this, you should have ZZIPlib installed - it allows the easiest way to work with zip archives.</p>
<p>In this article I will tell you how to add zip file support for your PHP installation.   As usually, we will need root access to our server with PHP compiled from source files.</p>
<p>In this article I will describe how to add zip support to PHP5 as it is installed at most servers at the moment. My OS is CentOS, but the installation should not differ from other operating systems, it&#8217;s easy enough to add zip functions.</p>
<p>First of all we need to ensure we have <strong>zlib</strong> installed. Run <strong>rpm -qa | grep zlib</strong> to check whether it is already installed and install it using yum if it is not present in the list created by the output of previous command. <strong>yum install zlib*</strong> should install everything related to zlib - that&#8217;s what we need to run zip.</p>
<p>Then run phpinfo() and copy the configure line you have. It should look like: <strong>./configure &#8211;with-apxs &#8211;with-curl &#8211;with-curl-dir=/usr/local/lib &#8211;with-gd &#8211;with-gd-dir=/usr/local &#8211;with-gettext &#8211;with-jpeg-dir=/usr/local/lib &#8211;with-kerberos</strong>, etc. Then you need to add <strong><span class="option">&#8211;enable-zip </span></strong><span class="option">to </span><span class="option">th</span><span class="option">is line. </span></p>
<p>Then you need to go to the directory where PHP source files are located. If you server has Directadmin installed, you should go to /usr/local/directadmin/customapache - your PHP files should be located there. Then change directory to the one with PHP source files and run the configuree command with  <strong><span class="option">&#8211;enable-zip </span></strong><span class="option">added. Then - make and make install as usually. </span></p>
<p>After this all you need is to reboot apache. Your PHP installation should now support zip functions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/25/how-to-install-zip-functions-support-for-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache Stopped Working After PHP Upgrade - How to Fix</title>
		<link>http://www.lampdocs.com/blog/2008/08/24/apache-stopped-working-after-php-upgrade-how-to-fix/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/24/apache-stopped-working-after-php-upgrade-how-to-fix/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 08:55:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apache Performance]]></category>

		<category><![CDATA[PHP Configuration]]></category>

		<category><![CDATA[apache does not reboot php upgrade]]></category>

		<category><![CDATA[Apache Stopped Working After PHP Upgrade]]></category>

		<category><![CDATA[php upgrade apache issues]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=148</guid>
		<description><![CDATA[If you are often working with PHP upgrades, you should do this automatically - you already know all the issues you might face. But if it&#8217;s done for the first time, it is quite hard to find your problem. I will tell you about the most common issue and about the applicable actions to fix [...]]]></description>
			<content:encoded><![CDATA[<p>If you are often working with PHP upgrades, you should do this automatically - you already know all the issues you might face. But if it&#8217;s done for the first time, it is quite hard to find your problem. I will tell you about the most common issue and about the applicable actions to fix this.</p>
<p>When you update your PHP installation via Directadmin build system or when you do this manually, new modules are added to httpd.cond, but the older ones are not deleted. This usually causes problems, as apache refuses to start after PHP upgrade, What do you need to do in order to tun apache again?</p>
<p>You need to edit your <strong>httpd.conf</strong> file (it is usually located at /etc/httpd/conf/httpd.conf). Open this file fith any editor you like and comment all strings that contain &#8220;php4&#8243;. The same directives for PHP5 are added automatically so you don&#8217;t have to worry about it. When you comment everything related to PHP4, you should save httpd.conf and try to reboot apache. If everything is OK, it should start, if not - you have to follow its logs or errors you receive at the command line window. Let me remind you that most useful way to restart apache is <strong>service httpd restart. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/24/apache-stopped-working-after-php-upgrade-how-to-fix/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Choice For System Backup for Windows - Acronis True Image</title>
		<link>http://www.lampdocs.com/blog/2008/08/20/my-choice-for-system-backup-for-windows-acronis-true-image/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/20/my-choice-for-system-backup-for-windows-acronis-true-image/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 08:24:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Software Reviews]]></category>

		<category><![CDATA[acronis backup]]></category>

		<category><![CDATA[acronis true image download]]></category>

		<category><![CDATA[backup software]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=146</guid>
		<description><![CDATA[Today I&#8217;ll tell you about an excellent software that allows to create any kind of info backups. That&#8217;s greatly important as you will be able to restore anything you like in just minutes. For example, if you have installed a fresh copy of Microsoft Windows, you know how much time it takes among with software [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ll tell you about an excellent software that allows to create any kind of info backups. That&#8217;s greatly important as you will be able to restore anything you like in just minutes. For example, if you have installed a fresh copy of Microsoft Windows, you know how much time it takes among with software setup. <a href="http://www.acronis.com/homecomputing/products/trueimage/">Acronis True Image Home</a> will revert your system to the tuned condition in just minutes. I&#8217;ve got a Russian version that&#8217;s why I won&#8217;t post any screenshots here.</p>
<p>Acronis true image Home is a powerful software that allows you to deal with any kind of data backup. It comes with scheduler so you won&#8217;t even need to create your backups manually - you will just have to keep your backups in a safe place. The rest is done with this software - I consider it&#8217;s more useful than Norton Ghost (I&#8217;ve used it for some time).</p>
<p><a href="http://www.acronis.com/homecomputing/products/trueimage/">Acronis True Image Home</a> also comes with secure file shredder - you can now safely delete your files. You can also Protect your privacy by cleaning up your activity track stored by Windows.</p>
<p>I suggest you to <a href="http://www.acronis.com/homecomputing/download/trueimage/">download</a> and install this software. I think you will be impressed with all the features it has and I think it&#8217;s worth its money</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/20/my-choice-for-system-backup-for-windows-acronis-true-image/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Modify Default Virtualhost Template in Directadmin</title>
		<link>http://www.lampdocs.com/blog/2008/08/20/how-to-modify-default-virtualhost-template-in-directadmin/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/20/how-to-modify-default-virtualhost-template-in-directadmin/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 07:56:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Directadmin Tricks]]></category>

		<category><![CDATA[common include directory directadmin]]></category>

		<category><![CDATA[directadmin new user templates]]></category>

		<category><![CDATA[directadmin templates directory]]></category>

		<category><![CDATA[directadmin virtualhost]]></category>

		<category><![CDATA[directadmin wildcard apache]]></category>

		<category><![CDATA[virtualhost template directadmin]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=145</guid>
		<description><![CDATA[If you own a Direactadmin server, most probably you would like to add something to default virtualhost settings, when a new user is created. You might need any specific php settings, or anything related to Apache - this doesn&#8217;t really matter. Let&#8217;s see where we can modify these settings; you will need SSH access to [...]]]></description>
			<content:encoded><![CDATA[<p>If you own a Direactadmin server, most probably you would like to add something to default virtualhost settings, when a new user is created. You might need any specific php settings, or anything related to Apache - this doesn&#8217;t really matter. Let&#8217;s see where we can modify these settings; you will need SSH access to your server as we will edit a configuration file.</p>
<p>We need to go to the directory, where configuration templates are located. It is <strong>/usr/local/directadmin/data/templates</strong>. There are lots of files, but we need virtual_host.conf to make the necessary changes to default virtualhost settings.</p>
<p>A default file should look like this (this is the original version):</p>
<blockquote><p>|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|<br />
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/usr/local/lib/php/|<br />
&lt;VirtualHost |IP|:80&gt;<br />
|CUSTOM|<br />
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|<br />
ServerName www.|DOMAIN|<br />
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|<br />
ServerAdmin |ADMIN|<br />
DocumentRoot |DOCROOT|<br />
|CGI|</p>
<p>|USECANONICALNAME|</p>
<p>User |USER|<br />
Group |GROUP|<br />
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes<br />
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined<br />
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log</p>
<p>&lt;Directory |DOCROOT|&gt;<br />
Options +Includes -Indexes<br />
|*if CLI=&#8221;1&#8243;|<br />
php_admin_flag engine |PHP|<br />
&lt;IfModule !mod_php6.c&gt;<br />
php_admin_flag safe_mode |SAFE_MODE|<br />
&lt;/IfModule&gt;<br />
php_admin_value sendmail_path &#8216;/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|&#8217;<br />
|*endif|<br />
|*if OPEN_BASEDIR=&#8221;ON&#8221;|<br />
php_admin_value open_basedir |OPEN_BASEDIR_PATH|<br />
|*endif|<br />
|*if SUPHP=&#8221;1&#8243;|<br />
suPHP_Engine |PHP|<br />
suPHP_UserGroup |USER| |GROUP|<br />
|*endif|<br />
&lt;/Directory&gt;<br />
|HANDLERS|<br />
|MIMETYPES|</p>
<p>&lt;/VirtualHost&gt;</p></blockquote>
<p>For example, we need to have a common include directory for PHP scripts, operated by many users. Certainly it is possible to go to <strong>/usr/local/directadmin/data/users </strong>and change include settings one by one. You can also edit php.ini, but this is the most unsecure solution.</p>
<p>In order to add a directory for common inclusion, we need to add it to the following string:</p>
<blockquote><p><strong> |?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/usr/local/lib/php/</strong><strong>:/YOUR_DIRECTORY</strong><strong>|</strong></p></blockquote>
<p>This file is easy to understand so if you need to have some specific settings, it is quite easy to apply them. For example, if you need to use wildcard subdomains, you will need the following string:</p>
<blockquote><p><strong> ServerAlias *.|DOMAIN| |DOMAIN| |SERVER_ALIASES|</strong></p></blockquote>
<p>Any changes related to default Directadmin virtualhost should be made in this file.</p>
<p>If you need to apply changes to existing users, the glue is to run the following command via SSH:</p>
<blockquote><p><strong>echo &#8220;action=rewrite&amp;value=httpd&#8221; &gt;&gt; /usr/local/directadmin/data/task.queue /usr/local/directadmin/dataskq d</strong></p></blockquote>
<p>This will apply the canges made to all users. All virtualhosts will be rewritten, so triple check the configuration before applying this command - in case of any error your sites may stop working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/20/how-to-modify-default-virtualhost-template-in-directadmin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress Stats - a Good Instrument for Blog Statistics</title>
		<link>http://www.lampdocs.com/blog/2008/08/19/wordpress-stats-a-good-instrument-for-blog-statistics/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/19/wordpress-stats-a-good-instrument-for-blog-statistics/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 04:59:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Wordpress Ideas]]></category>

		<category><![CDATA[wordpress statistics]]></category>

		<category><![CDATA[wordpress stats easy to install]]></category>

		<category><![CDATA[worpress stats screenshots]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=141</guid>
		<description><![CDATA[Just went back from my trip to Turkey. I like that my blog visitors come day by day to read my posts even if I don&#8217;t write anything day by day. Today I&#8217;ll tell you about an official Wordpress plugin named Wordpress Stats.
Wordpress stats is a good solution for newbies who want to track where [...]]]></description>
			<content:encoded><![CDATA[<p>Just went back from my trip to Turkey. I like that my blog visitors come day by day to read my posts even if I don&#8217;t write anything day by day. Today I&#8217;ll tell you about an official Wordpress plugin named <a href="http://wordpress.org/extend/plugins/stats/">Wordpress Stats</a>.</p>
<p>Wordpress stats is a good solution for newbies who want to track where visitors come from. I consider it&#8217;s more informative than Webalizer is, as Webalizer&#8217;s data is hard to understand and you have lots of information you cannot use. Let&#8217;s take a look at Webalizer stats page to understand why it is recommended to install it.</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats.jpg"><img class="alignnone size-medium wp-image-142" title="wordpress stats" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats-300x139.jpg" alt="" width="300" height="139" /></a></p>
<p>This is the first screen that appears when you click the stats link. It shows you the number of your blog visitors day by day. Quite simple and useful.</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats2.jpg"><img class="alignnone size-medium wp-image-143" title="where do people come to your blog from" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats2-300x145.jpg" alt="" width="300" height="145" /></a></p>
<p>The second page shows you how do people come to your blog and what pages are most popular.</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats3.jpg"><img class="alignnone size-medium wp-image-144" title="wordpress search engine visitors" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/08/wstats3-300x158.jpg" alt="" width="300" height="158" /></a></p>
<p>The next one shows search engine terms, that is especially informative. You can track what keywords are relevant for your blog and what people are actually searching for to get to your blog.</p>
<p>Installation is very easy - you don&#8217;t need to do anything but upload a single file and get your Wordpress API code. Account at wordpress.com is created in one minute, so the stats system will be installed in some minutes. If you&#8217;re looking for a simple yet informative stats system for your Wordpress blogs - Wordpress stats is the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/19/wordpress-stats-a-good-instrument-for-blog-statistics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Function to Extract The Value From a String With PHP</title>
		<link>http://www.lampdocs.com/blog/2008/08/08/function-to-extract-the-value-from-a-string-with-php/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/08/function-to-extract-the-value-from-a-string-with-php/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 07:26:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Solutions]]></category>

		<category><![CDATA[extract string value php]]></category>

		<category><![CDATA[extract text from string php]]></category>

		<category><![CDATA[extract value from string]]></category>

		<category><![CDATA[extract value from string php]]></category>

		<category><![CDATA[extracting from php string]]></category>

		<category><![CDATA[parse value php]]></category>

		<category><![CDATA[php function extract string]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=140</guid>
		<description><![CDATA[If you&#8217;re working with text information, you often need to extract some parts of text from articles, web pages and so on. You can use regular expressions for this, but if you&#8217;re not familiar with them, you&#8217;ve got to use string functions of PHP.
When I didn&#8217;t know what regular expressions are, I&#8217;ve written a function [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working with text information, you often need to extract some parts of text from articles, web pages and so on. You can use regular expressions for this, but if you&#8217;re not familiar with them, you&#8217;ve got to use string functions of PHP.</p>
<p>When I didn&#8217;t know what regular expressions are, I&#8217;ve written a function that extracts the text you need from a string. It is useful when you need to parse forms, web pages for some exact information, etc. Here it is:</p>
<blockquote><p>&lt;?</p>
<p>function extract_value($source, $start, $end)<br />
{<br />
$pos=@strpos($source, $start)+strlen(stripslashes($start));<br />
$pos2=@strpos($source, $end, $pos);<br />
$len=$pos2-$pos;<br />
$output=substr($source, $pos, $len);<br />
return $output;<br />
}</p>
<p>?&gt;</p></blockquote>
<p>Function above takes three arguments: text source, the first matching part and the second matching part. Function extracts the text between these two values. Sample usage is: <strong>$match=extract_value($result, &#8220;from here&#8221;, to here&#8221;); </strong>This is much easier than to deal with regular expressions, especially if you are new to PHP. This function is not for professionals, however it is a great solution if you often need to parse something from text without regular expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/08/function-to-extract-the-value-from-a-string-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Change Owner for All Files in a Folder Linux</title>
		<link>http://www.lampdocs.com/blog/2008/08/06/how-to-change-owner-for-all-files-in-a-folder-linux/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/06/how-to-change-owner-for-all-files-in-a-folder-linux/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 09:39:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Tricks]]></category>

		<category><![CDATA[change owner of files linux]]></category>

		<category><![CDATA[change ownership folder]]></category>

		<category><![CDATA[change ownership of a folder in linux]]></category>

		<category><![CDATA[linux change owner]]></category>

		<category><![CDATA[recurrent change of file owner linux]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=139</guid>
		<description><![CDATA[A system administrator often needs to deal with file ownership change. This is often related to the ownership of the files created by daemons. Often users don&#8217;t have access to the file created by apache. What to do if you need to change ownership of a group of files?
You must be root to perform this [...]]]></description>
			<content:encoded><![CDATA[<p>A system administrator often needs to deal with file ownership change. This is often related to the ownership of the files created by daemons. Often users don&#8217;t have access to the file created by apache. What to do if you need to change ownership of a group of files?</p>
<p>You must be root to perform this operation. The following command will change permissions to all files in the specified folder. This is related to user and group permissions so you don&#8217;t need to run <strong>chgrp</strong> command.</p>
<blockquote><p><strong>chown -R &lt;user&gt;:&lt;usergroup&gt; &lt;folder&gt;</strong></p></blockquote>
<p>This will recursively change ownership to the files located in the folder. Note that most web hosting panels create user groups with the same name as users&#8217; so the command will most probably look like <strong>chown -R &lt;user&gt;:&lt;user&gt; &lt;folder&gt;</strong>. You can use any masks, for example, if you need to change ownership of html files only you need to issue <strong>chown -R &lt;user&gt;:&lt;user&gt; &lt;folder&gt;/*.html</strong></p>
<p>This is quite a simple operation, however many people who want to take a look at their servers don&#8217;t know this. I hope this article will help you to manage your files</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/06/how-to-change-owner-for-all-files-in-a-folder-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Create All Possible Word Combinations from a String With PHP</title>
		<link>http://www.lampdocs.com/blog/2008/08/04/how-to-create-all-possible-word-combinations-from-a-string-with-php/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/04/how-to-create-all-possible-word-combinations-from-a-string-with-php/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 05:59:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Configuration]]></category>

		<category><![CDATA[PHP Solutions]]></category>

		<category><![CDATA[all possible combinations of an array php]]></category>

		<category><![CDATA[all possible word combinations]]></category>

		<category><![CDATA[create all word combinations]]></category>

		<category><![CDATA[create word combinations PHP]]></category>

		<category><![CDATA[for generate all array combinations]]></category>

		<category><![CDATA[generate all combination from array]]></category>

		<category><![CDATA[Invert a string PHP]]></category>

		<category><![CDATA[inverting a php string]]></category>

		<category><![CDATA[php generate combinations]]></category>

		<category><![CDATA[php output all combinations]]></category>

		<category><![CDATA[PHP script number combination]]></category>

		<category><![CDATA[word combinations]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=138</guid>
		<description><![CDATA[Sometimes you need to change the word order in a line for some reason. I am going to show you a PHP solution that allows you to create all possible word combinations from a string. The code below should explain you all operations that are performed.
&#60;?
// Factorial
function fact($s){
if ($s==0) return 1;
else return $fact = $s [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to change the word order in a line for some reason. I am going to show you a PHP solution that allows you to create all possible word combinations from a string. The code below should explain you all operations that are performed.</p>
<blockquote><p>&lt;?</p>
<p>// Factorial<br />
function fact($s){<br />
if ($s==0) return 1;<br />
else return $fact = $s * fact($s-1);<br />
}</p>
<p>$phrase=&#8221;Your Phrase Comes Here&#8221;;<br />
// Let&#8217;s count the number of words by creating an array<br />
$words=explode(&#8221; &#8220;, $phrase);<br />
$n=count($words);</p>
<p>// Here comes a loop that creates all possible combinations of array positions<br />
for ($m=1; $m&lt;=fact($n); $m++)<br />
{<br />
$ken = $m-1;<br />
$f = 1;<br />
$a = array();<br />
for($iaz=1; $iaz&lt;=$n; $iaz++)<br />
{<br />
$a[$iaz] = $iaz;<br />
$f = $f*$iaz;<br />
}<br />
for($iaz=1; $iaz&lt;=$n-1; $iaz++)<br />
{<br />
$f = $f/($n+1-$iaz);<br />
$selnum = $iaz+$ken/$f;<br />
$temp = $a[$selnum];<br />
for($jin=$selnum; $jin&gt;=$iaz+1; $jin&#8211;)<br />
{<br />
$a[$jin] = $a[$jin-1];<br />
}<br />
$a[$iaz] = $temp;<br />
$ken = $ken%$f;<br />
}<br />
$t=1;</p>
<p>// Let&#8217;s start creating a word combination: we have all the necessary positions<br />
$newphrase=&#8221;";</p>
<p>// Here is the while loop that creates the word combination<br />
while ($t&lt;=$n)<br />
{<br />
$newphrase.=$words[$a[$t]-1].&#8221; &#8220;;<br />
$t++;<br />
}<br />
// Output of the phrase<br />
echo $newphrase.&#8221;\r\n&#8221;;</p>
<p>}</p>
<p>?&gt;</p></blockquote>
<p>The example above will output:</p>
<p>Your Phrase Comes Here<br />
Your Phrase Here Comes<br />
Your Comes Phrase Here<br />
Your Comes Here Phrase<br />
Your Here Phrase Comes<br />
Your Here Comes Phrase<br />
Phrase Your Comes Here<br />
Phrase Your Here Comes<br />
Phrase Comes Your Here<br />
Phrase Comes Here Your<br />
Phrase Here Your Comes<br />
Phrase Here Comes Your<br />
Comes Your Phrase Here<br />
Comes Your Here Phrase<br />
Comes Phrase Your Here<br />
Comes Phrase Here Your<br />
Comes Here Your Phrase<br />
Comes Here Phrase Your<br />
Here Your Phrase Comes<br />
Here Your Comes Phrase<br />
Here Phrase Your Comes<br />
Here Phrase Comes Your<br />
Here Comes Your Phrase<br />
Here Comes Phrase Your</p>
<p>You can play with number combinations instead of words.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/04/how-to-create-all-possible-word-combinations-from-a-string-with-php/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
