<?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>myBLOG.com.np</title>
	<atom:link href="http://www.myblog.com.np/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.myblog.com.np</link>
	<description>it's my technology blog</description>
	<pubDate>Sun, 17 Feb 2008 06:16:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>&#8216;Cannot Open the File: Mk:@MSITStore&#8217; Error Message</title>
		<link>http://www.myblog.com.np/2008/02/17/cannot-open-the-file-mkmsitstore-error-message/</link>
		<comments>http://www.myblog.com.np/2008/02/17/cannot-open-the-file-mkmsitstore-error-message/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 06:16:42 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2008/02/17/cannot-open-the-file-mkmsitstore-error-message/</guid>
		<description><![CDATA[Perhaps it has happened to you as well to get a weird message while trying to open a help file under Windows 9x and even 2000/XP: &#8220;Cannot Open the File: Mk:@MSITStore: C:\Windows\Help\Windows.chm&#8221;, here is how you can fix this problem.
Windows and errors
Windows XP is far less susceptible to errors than Windows 9x, it seems there [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps it has happened to you as well to get a weird message while trying to open a help file under Windows 9x and even 2000/XP: &#8220;Cannot Open the File: Mk:@MSITStore: C:\Windows\Help\Windows.chm&#8221;, here is how you can fix this problem.<span id="more-135"></span></p>
<p><strong>Windows and errors<br />
</strong>Windows XP is far less susceptible to errors than Windows 9x, it seems there are still some errors that remind me of that old operating system. One of them is an error you usually get when you uninstall a program.</p>
<p>You install a small program for a random purpose, you like it or not and for some reason you uninstall it. You don&#8217;t notice anything suspicious and after a couple of days (or perhaps the very next moment) you try to open a help file and notice a weird error message.</p>
<p><a href="http://www.myblog.com.np/wp-content/uploads/2008/02/help_error.gif" title="help_error.gif"><img src="http://www.myblog.com.np/wp-content/uploads/2008/02/help_error.gif" alt="help_error.gif" border="0" /></a></p>
<p>Although this is not very common, it has happened twice to myself and I&#8217;ve seen at least hundreds of complains about it over the Internet.</p>
<p>Some people would just reinstall the operating system and eventually get rid of this problem, yet there is also a much easier solution.</p>
<p><strong>The hhctrl.ocx file</strong><br />
The problem is caused by the file hhctrl.ocx located in your System32 folder (or just System on some OS) and most likely has been overwritten by an application with an incompatible version.</p>
<p>So, all you need to do is either look for it on the cabinet file from your Windows CD-ROM or download/copy a working version from an outside source (or even from a backup you might have made yourself). You can for example download a working version from: <a href="http://freeware.it-mate.co.uk/?Cat=OCX_Files" target="_blank">http://freeware.it-mate.co.uk/?Cat=OCX_Files</a></p>
<p>When you have it on your computer, just copy it into your c:\windows\system32\ folder (well, if your Windows directory is called otherwise, change it accordingly) and overwrite the old version.</p>
<p>Then, go to your start Menu and select Run:</p>
<p>regsvr32 c:\windows\system32\hhctrl.ocx</p>
<p><a href="http://www.myblog.com.np/wp-content/uploads/2008/02/help_error_fix.gif" title="help_error_fix.gif"><img src="http://www.myblog.com.np/wp-content/uploads/2008/02/help_error_fix.gif" alt="help_error_fix.gif" border="0" /></a></p>
<p>After that you should see a message that the file was registered successfully. Open a help file to see if it worked. If it didn&#8217;t, try a different version of that file.</p>
<p><strong>Related links:</strong><br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;312456" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;312456</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2008/02/17/cannot-open-the-file-mkmsitstore-error-message/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stumble Exchange Sites</title>
		<link>http://www.myblog.com.np/2007/12/27/stumble-exchange-sites/</link>
		<comments>http://www.myblog.com.np/2007/12/27/stumble-exchange-sites/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 23:58:36 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/12/27/stumble-exchange-sites/</guid>
		<description><![CDATA[We all know that stumbleupon can drive huge amounts of traffic to your blog or article, but typically we are all lazy to stumble our own and others peoples posts, most of us hope that our readers of friends will stumble them to increase traffic , but generally this will only bring in small increases [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that stumbleupon can drive huge amounts of traffic to your blog or article, but typically we are all lazy to stumble our own and others peoples posts, most of us hope that our readers of friends will stumble them to increase traffic , but generally this will only bring in small increases of traffic, to gain the maximum from stumbles you will have to join a stumble exchange or swapping group</p>
<p>Generally they work in a very simple way, find and join the site and register yourself, now you stumble the posts above you in the list and submit yours to the bottom, after which the next person will continue where you left off.<span id="more-132"></span></p>
<p>There are two types of sites that will do stumbling, <strong>forums</strong> or <strong>websites</strong> both these work but in different ways.</p>
<p><strong>Forums</strong> can be used and theres a few out there which practice stumble exchanges, some of the advantages are you can interact with people on a personnel level, and quite often people will become friends and normally you have the option to add your tags, category and the description of the post, the negative side is the smaller quantity of stumblers as often the sites need passwords to enter so with limited readership so must posts are thumbed up by the same people.</p>
<p><strong>Websites</strong> have there advantages as you can gain larger volume of stumbles compared to a forum site and are fast to submit and have a large number of different stumblers but you normally are not able to select your tags, categories and descriptions so you are limited here.</p>
<p>You may like try <strong><a href="http://suexchange.com/r.php?u=thapame" target="_blank">Suexchange</a></strong> where you can submit your website and have the ability to stumble others in exchange. They have a referral system in place to allow you to gain more stumbles form other if you have more people under you.</p>
<p>In conclusion both types of sites have common advantages and disadvantages like increased volume of traffic etc, just look at whether these short boosts in traffic are quality readers. At the same time any unique viewer who finds your site though stumbling has the potential to be a new regular reader in the future.</p>
<p>So tagging, categories and descriptions will help ensure quality traffic comes to your site, therefore stumbling yourself first will help to put your article in the correct position.</p>
<p>Please feedback if you use a stumble swap/exchange site? And has it helped your site?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/12/27/stumble-exchange-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to make a FireFox Search Plugin and how to install it! Full Tutorial!</title>
		<link>http://www.myblog.com.np/2007/12/13/how-to-make-a-firefox-search-plugin-and-how-to-install-it-full-tutorial/</link>
		<comments>http://www.myblog.com.np/2007/12/13/how-to-make-a-firefox-search-plugin-and-how-to-install-it-full-tutorial/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 18:30:26 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/12/13/how-to-make-a-firefox-search-plugin-and-how-to-install-it-full-tutorial/</guid>
		<description><![CDATA[The tutorial many people have been waiting for, is finally here! In this tutorial you will learn to make a FireFox Search Plugin, just like the one in the top right of your browser. Using the search plugin, you can tell it to search your site or forum. You will be able to search, Invision [...]]]></description>
			<content:encoded><![CDATA[<p>The tutorial many people have been waiting for, is finally here! In this tutorial you will learn to make a FireFox Search Plugin, just like the one in the top right of your browser. Using the search plugin, you can tell it to search your site or forum. You will be able to search, Invision Power Board. vBulletin. Your custom coded script, that&#8217;s if its coded well. and any software or script that has a search function. This plugin will be able to search it!<span id="more-126"></span></p>
<p>So obviously as with everything else, there is a theory behind making this plugin. The plugin uses a file, which contains all the data needed. The file is a .src and you will learn more about that soon. In the .src you will find information such as, the site name, the site URL, the search method, the input fields and lots more. This may sound confusing, but it will make more sense later! To edit the .src file I recommend you use Notepad. I am going to explain how to make a search plugin for one of my site then I will tell you how to adapt it. If you are looking to make a plugin for PHPBB, MyBB or another script you will need to have an advanced knowledge of how to make a plugin. Obviously I cant tell you how to make a plugin for every single forum software, blog software etc. I am teaching you how to do this, not how to copy and paste my code.<!--more--></p>
<p>This tutorial is going to be based around creating a domain whois search plugin for whatismyip.com.np site. Now I have already created this plugin before, Here, but am going to be showing you how to do it!</p>
<p><strong>Step 1</strong><br />
First of all, you need to open up Notepad or another kind of editor that accepts .src file extensions. Now create a new document and name it firefox_search.src</p>
<p><strong>Step 2</strong><br />
Now we have the file created, lets start adding some content that will make up our Firefox Search Plugin.</p>
<p>So now put this text into the file:</p>
<blockquote><p> &lt;search<br />
version=&#8221;1.0&#8243;<br />
name=&#8221;Check Domain &amp; Whois&#8221;<br />
description=&#8221;Find your IP address, check Domain availability and Whois information&#8221;</p></blockquote>
<p>Now the explanation&#8230;</p>
<p><strong>&lt;search</strong> means we are obviously starting a new search bar. So this must be placed at the beginning of every Search Plugin you make.</p>
<p><strong>The next 3 lines are pretty self explanatory..</strong></p>
<p><strong>version</strong> is the version of the plugin not the version of FireFox. This can be anything number wise, it really doesn&#8217;t matter what it is. As long as it is numerical.</p>
<p><strong>name</strong> is the name of this plugin. For this case, we are searching <strong>Check Domain &amp; Whois</strong> so that&#8217;s what we are going to call it. Again, you can call it anything you want it really doesn&#8217;t matter.</p>
<p><strong>description</strong> is a small description of the plugin. Again very self explanatory. Just type a small description about the plugin. In this case, I have just put <strong>Find your IP address, check Domain availability and Whois information</strong> because that is basically what it does.</p>
<p>Now we are going to add a bit more content and information into the file.</p>
<blockquote><p> method=&#8221;get&#8221;<br />
action=&#8221;http://www.whatismyip.com.np/whois.php&#8221;</p></blockquote>
<p>This time we have added <strong>method</strong> and <strong>action</strong>. Again, both are really easy to understand so I will explain quickly&#8230;</p>
<p><strong>method</strong> is the method of the search engine. Does the search engine use <strong>post</strong> or <strong>get</strong>? That&#8217;s all you enter here.. post or get. WhatIsMyIP.com.np uses post so that&#8217;s what I have used here.</p>
<p><strong>action</strong> is the location of the search form or file. In this case the search form / file is in the same location so we enter the URL. For this plugin I have used This URL because that is the location of the search form.</p>
<p>Now add the following lines.</p>
<blockquote><p> searchForm=&#8221;http://www.whatismyip.com.np&#8221;<br />
queryEncoding=&#8217;UTF-8&#8242;<br />
queryCharset=&#8217;UTF-8&#8242;<br />
&gt;</p></blockquote>
<p>As you can see, we have added.. <strong>searchForm</strong>, <strong>queryEncoding</strong> and <strong>queryCharset</strong>. These 3 things may sound complicated but there actually real simple.</p>
<p><strong>searchForm</strong> I&#8217;m not 100% sure about but I always enter the site url in and it always works fine.</p>
<p><strong>queryEncoding</strong> is the encoding of the query. The query is what is entered into the search box.</p>
<p><strong>queryCharset</strong> is the character set of the query.</p>
<p>As you will see, we have ended the <strong>&lt;search&gt;&lt;/search&gt;</strong> tag with a <strong>&gt;</strong>. That&#8217;s the first part done.</p>
<p>Next we make the input boxes, just like if we were doing it in HTML just a little different.</p>
<blockquote><p> &lt;input name=&#8221;query&#8221; /&gt;</p></blockquote>
<p>Now for this plugin I only needed 1 inputs where we enter the term to search.<br />
As you can see on the first input, we have the word <strong>user</strong> at the end. That means it&#8217;s the input that will show. It will not always be named query, with different software or coding it will probably be different. If you want hidden field on your search plugins then simply don&#8217;t use attribute <strong>user</strong> in the above code.</p>
<p>That&#8217;s all the inputs you need to make a search plugin for WhatIsMyIP.com.np.</p>
<p>That is basically the plugin created. That is now a working script, but we don&#8217;t want to finish there&#8230; I will now show you something else.. very special&#8230;</p>
<p>Now it isn&#8217;t that special so don&#8217;t get too excited, but this part is optional. You can make FireFox check for plugin updated every so days. You can define how many ever days to check for updates&#8230;</p>
<blockquote><p> &lt;browser<br />
update=&#8221;http://www.whatismyip.com.np/pluggins/firefox_search.src&#8221;<br />
updateicon=&#8221;http://www.whatismyip.com.np/favicon.ico&#8221;<br />
updatecheckdays=&#8221;1&#8243;<br />
&gt;</p></blockquote>
<p>Having <strong>&lt;browser&gt;&lt;/browser&gt;</strong> starts the browser part of this script. A few things must be defined inside here&#8230;</p>
<p><strong>update</strong> is the location of the actual src file. If you want FireFox to check for updates on this plugin, the url needs to be pointing to the uploaded src.</p>
<p><strong>updateicon</strong> is the location of the icon on the search plugin. Now this can be a favicon from your site or an image. The image icon will be resized to 16 x 16 to fit.</p>
<p><strong>updatecheckdays</strong> is pretty obvious, how many days do you want between when FireFox checks for updates.</p>
<p>So now everything is made, obviously it needs to be installed for it to work. It doesn&#8217;t just magically appear in your browser.</p>
<p>Now to install a plugin we need to use Javascript. Obviously you will need javascript enabled for it to be able to install. I will give you the script that installs it, you may say its very similar to Mozilla&#8217;s version&#8230; but actually it is. There is only 1 way to install these plug ins.</p>
<p>create a new file with <strong>.js</strong> extenstion and place following script</p>
<blockquote><p> function addEngine(url, img, name, desc) {<br />
if ((typeof window.sidebar == &#8220;object&#8221;) &amp;&amp; (typeof window.sidebar.addSearchEngine == &#8220;function&#8221;)) {<br />
window.sidebar.addSearchEngine (url, img, name, desc);<br />
} else {<br />
alert(&#8221;You need a Mozilla based browser such as firefox to use this.&#8221;);<br />
}<br />
}</p></blockquote>
<p>Now following code needs to go in your page between <strong>&lt;head&gt;&lt;/head&gt; </strong> with correct path of the <strong>.js</strong> file you created above.</p>
<p>&lt;a href=&#8221;#&#8221; onclick=&#8221;addEngine(&#8217;http://www.whatismyip.com.np/pluggins/firefox_search.src&#8217;, &#8216;http://www.whatismyip.com.np/images/favicon.ico&#8217;, &#8216;Check Domain &amp; Whois&#8217;, &#8216;Find your IP address, check Domain availability and Whois information&#8217;); return false;&#8221;&gt;Install Now&lt;/a&gt;</p>
<p>Now place following code anywhere you want to display the link for installing this plugin on user&#8217;s side.</p>
<p>And that&#8217;s it. Thank you very much for reading and hopefully this tutorial was easier to understand than Mozilla&#8217;s guide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/12/13/how-to-make-a-firefox-search-plugin-and-how-to-install-it-full-tutorial/feed/</wfw:commentRss>
		</item>
		<item>
		<title>how to define adult or mature content for google adsense</title>
		<link>http://www.myblog.com.np/2007/11/20/how-to-define-adult-or-mature-content-for-google-adsense/</link>
		<comments>http://www.myblog.com.np/2007/11/20/how-to-define-adult-or-mature-content-for-google-adsense/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 07:04:45 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/11/20/how-to-define-adult-or-mature-content-for-google-adsense/</guid>
		<description><![CDATA[I have been confused from a long time on what types of contents were called Adult or Mature contents on Google Adsense. I wanted to know is there any kind of measurements on that which is clearly defined on adsense or how can I clearly know if any pictures or texts we were going to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been confused from a long time on what types of contents were called Adult or Mature contents on Google Adsense. I wanted to know is there any kind of measurements on that which is clearly defined on adsense or how can I clearly know if any pictures or texts we were going to place on our site is Adult contents or not. So I asked the same question to the Adsense support team and below is the reply from them:<span id="more-125"></span></p>
<p>&#8220;&#8230; Thanks for following up with us. I&#8217;ll be happy to provide clarification of our policy regarding adult/mature content.</p>
<p>Our policy regarding adult/mature content may include any material that is not appropriate for all audiences. While this obviously includes full nudity or sexual activity, it may also include textually explicit sexual content, some treatments of topics such as sexual health and sex tips, and image or video content containing lewd or provocative poses, strategically covered nudity, see-through or sheer clothing, and close-ups of breasts, butts, or crotches.</p>
<p>While it&#8217;s not a sure test, we sometimes suggest that publishers ask themselves the following questions to determine if content is family- safe:</p>
<p>Would I be comfortable viewing this content with my parents or children in the same room?<br />
Would I feel comfortable viewing this content if my boss walked up behind me while I had this content on my screen?</p>
<p>If the answer to either of these questions is no, then it is likely that some advertisers would not be comfortable showing their ads on such content and we might consider it mature&#8230;&#8221;</p>
<p>and personally I think the clarification they provide me is quite clear. so from the above info anyone can easily find out, if the contents is adult/mature or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/11/20/how-to-define-adult-or-mature-content-for-google-adsense/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Go Live PHP &#038; IIS</title>
		<link>http://www.myblog.com.np/2007/10/11/go-live-php-iis/</link>
		<comments>http://www.myblog.com.np/2007/10/11/go-live-php-iis/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 21:27:01 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/10/11/go-live-php-iis/</guid>
		<description><![CDATA[PHP just got a major boost from Microsoft this morning with the release of  FastCGI for windows. Anyone working with PHP and Windows knows just how  painful it can be, if you can get it to work reliably at all. We have been working with a number of projects that all involved PHP [...]]]></description>
			<content:encoded><![CDATA[<p>PHP just got a major boost from Microsoft this morning with the release of  FastCGI for windows. Anyone working with PHP and Windows knows just how  painful it can be, if you can get it to work reliably at all. We have been working with a number of projects that all involved PHP on IIS, and  seen web sites entirely wiped out due to bad upgrades, where even the backups of  the backups would not work due to one technical issue after another until having  to revert to the previous version of PHP on IIS.<span id="more-124"></span></p>
<p>Today Microsoft is eager to announce availability of the Go Live release of  Microsoft FastCGI Extension for IIS 5.1/6.0 (FastCGI Extension) as a free  download. The Go Live release is the last step in the Microsoft beta process and  represents the highest level of quality and reliability. For the first time,  customers have a license that permits them to deploy the FastCGI Extension on  their production Internet Information Services 6.0 (IIS 6) Web servers. Source:  IIS.net</p>
<p>Hopefully this will ease a lot of pain, and well worth checking out to see if  this makes PHP running on IIS (which we know of many such installations) will  help web masters and programmers not have to deal with the pain of getting PHP  to work on IIS. The good part is that the new program is in both 32 and 64-bit  versions.</p>
<p>You can download the program <a href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1521" class="bluelink" title="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1521">here</a>.</p>
<p>When we wrapped this up on an XP developer&#8217;s laptop this morning, we did notice  a speed increase; we also noticed fewer errors when programming a MySQL connect  structure via PHP. There is nothing better than seeing your developer grin and  nod his head.</p>
<p>This is also an important part is Microsoft supporting  Open Source. PHP used to only work reliably on Linux, and given the investment  in technology, people, and training, switching a technology can be very  expensive. Moving from PHP to dot net can be difficult, and will get a lot of  resistance in a company. The program is well worth checking out if the company  has stabilized on Windows and PHP. It might just make a lot of folks days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/10/11/go-live-php-iis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to sync data between 2 servers automatically</title>
		<link>http://www.myblog.com.np/2007/10/11/how-to-sync-data-between-2-servers-automatically/</link>
		<comments>http://www.myblog.com.np/2007/10/11/how-to-sync-data-between-2-servers-automatically/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 21:04:14 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/10/11/how-to-sync-data-between-2-servers-automatically/</guid>
		<description><![CDATA[Have you ever wanted to know how to easily synchronize the data between multiple servers automatically?
In this article Ill explain how to setup 2 Linux servers to automatically synchronize data between a specific directory on each server. To do this we will use rsync, ssh key authentication, and a cron job.
Lets call the 2 servers [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to know how to easily synchronize the data between multiple servers automatically?<br />
In this article Ill explain how to setup 2 Linux servers to automatically synchronize data between a specific directory on each server. To do this we will use rsync, ssh key authentication, and a cron job.<span id="more-123"></span></p>
<p>Lets call the 2 servers SOURCESERVER and DESTSERVER for<br />
<em>SOURCESERVER</em> = Source server (the server were connecting from to upload the data)<br />
<em>DESTSERVER</em> = Destination server (the server were connecting to receive the data)</p>
<p><strong>Part 1 - Setting up SSH key authentication</strong></p>
<p>First, we need to make sure the DESTSERVER has the ability to use key authentication enabled. Find your sshd configuration file (usually /etc/ssh/sshd_config) and enable the following options if they are not already set.</p>
<p>RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
AuthorizedKeysFile     .ssh/authorized_keys<br />
<span id="more-6"></span><br />
If you edit the file be sure to restart sshd afterwards.</p>
<p># /etc/init.d/sshd restart</p>
<p>Next, on the SOURCESERVER we will create the public / private key pair to be used for authentication with the following command.</p>
<p># ssh-keygen -t rsa</p>
<p>*Note: Do not enter a passphrase for this, just hit enter when prompted.</p>
<p>This should create 2 files, a public key file and a private key file.<br />
The public key file (usually [homedir]/.ssh/id_rsa.pub) we will upload to the DESTSERVER.<br />
The private key file (usually [homedir]/.ssh/id_rsa) we will keep on the SOURCESERVER.<br />
*Be sure to keep this private key safe. With it anyone will be able to connect to the DESTSERVER that contains the public key.</p>
<p>Now we will plant the public key we created on to the DESTSERVER.<br />
Choose the user account which you will use to connect to on DESTSERVER, well call this user destuser for now.<br />
In that accounts home directory, create a .ssh subdirectory, and in that directory create a new text file called authorized_keys. If it already exists, great, use the existing file.<br />
Open the authorized_keys file and paste in the contents of the public key you created in the previous step (id_rsa.pub). It should look something like the following</p>
<p>ssh-rsa &lt;lots and lots of characters&gt; sourceuser@SOURCESERVER</p>
<p>Save the file and change the permissions to 600 for the file and 700 for the .ssh directory.</p>
<p>Now to test that the keys are working.<br />
From the SOURCESERVER try logging in as normal using ssh to the DESTSERVER.</p>
<p># ssh destuser@DESTSERVER</p>
<p>If all is working you should not be prompted for a password but instead connected directly to a shell on the DESTSERVER.</p>
<p><strong><br />
Part 2 - Creating the rsync script</strong></p>
<p>Now for the rsync script.<br />
I use a simple script such as the following</p>
<p>-</p>
<p>#!/bin/bash</p>
<p>SOURCEPATH=/source/directory<br />
DESTPATH=/destination<br />
DESTHOST=123.123.123.123?<br />
DESTUSER=destuser<br />
LOGFILE=rsync.log</p>
<p>echo $\n\n &gt;&gt; $LOGFILE<br />
rsync -av rsh=ssh $SOURCEPATH $DESTUSER@$DESTHOST:$DESTPATH 2&gt;&amp;1 &gt;&gt; $LOGFILE<br />
echo Completed at: `/bin/date` &gt;&gt; $LOGFILE</p>
<p>-</p>
<p>Copy this file into the home directory of the sourceuser on the SOURCESERVER<br />
and modify the first 4 variables in the file.<br />
SOURCEPATH (Source path to be synced)<br />
DESTPATH (Destination path to be synced)<br />
DESTHOST (Destination IP address or host name)<br />
DESTUSER (User on the destination server)<br />
Save it as something like rsync.sh<br />
Set the permissions on the file to 700.<br />
# chmod 700 rsync.sh</p>
<p>Now you should be able to run the script, have it connect to the DESTSERVER, and transfer the files all without your interaction.<br />
The script will send all output to the rsync.log file specified in the script.</p>
<p><strong><br />
Part 3 - Setting up the cron job</strong></p>
<p>Assuming everything has worked so far all thats left is to setup a cron job to run the script automatically at a predefined interval.</p>
<p>As the same sourceuser use the crontab command to create a new cron job.</p>
<p># crontab -e</p>
<p>This will open an editor where you can schedule the job.<br />
Enter the following to have the script run once every hour</p>
<p>-<br />
# Run my rsync script once every hour<br />
0 * * * *    /path/to/rsync.sh<br />
-</p>
<p>Your 2 servers should now be syncing the chosen directory once every hour.<br />
Hope this helped, let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/10/11/how-to-sync-data-between-2-servers-automatically/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Continue script execution on client disconnection</title>
		<link>http://www.myblog.com.np/2007/10/03/continue-script-execution-on-client-disconnection/</link>
		<comments>http://www.myblog.com.np/2007/10/03/continue-script-execution-on-client-disconnection/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 17:15:13 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/10/03/continue-script-execution-on-client-disconnection/</guid>
		<description><![CDATA[To continue the script execution on client disconnection, you can use a function provided by PHP called &#8216;ignore_user_abort&#8217;. This function sets whether on client disconnect, should script execution be continued or aborted. Calling the function with the parameter set to &#8216;TRUE&#8217; should ignore user disconnection and continue with script execution.

&#60;?php
ignore_user_abort(TRUE);
?&#62;

When finished you may again set [...]]]></description>
			<content:encoded><![CDATA[<p>To continue the script execution on client disconnection, you can use a function provided by PHP called &#8216;ignore_user_abort&#8217;. This function sets whether on client disconnect, should script execution be continued or aborted. Calling the function with the parameter set to &#8216;TRUE&#8217; should ignore user disconnection and continue with script execution.<span id="more-122"></span></p>
<blockquote><p>
&lt;?php<br />
ignore_user_abort(TRUE);<br />
?&gt;
</p></blockquote>
<p>When finished you may again set the value to FALSE to allow the script to halt on client disconnect.</p>
<blockquote><p>
&lt;?php<br />
ignore_user_abort(FALSE);<br />
?&gt;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/10/03/continue-script-execution-on-client-disconnection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is a Wildcard DNS?</title>
		<link>http://www.myblog.com.np/2007/09/03/what-is-a-wildcard-dns/</link>
		<comments>http://www.myblog.com.np/2007/09/03/what-is-a-wildcard-dns/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 09:46:22 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/09/03/what-is-a-wildcard-dns/</guid>
		<description><![CDATA[A wildcard DNS record is a catch all record in a DNS zone that will match all non-existent requests for a domain name. Just like whenever you setup &#8220;catch all&#8221; or &#8220;nobody&#8221; email account, that will act as a &#8220;catch-all&#8221; account for any non-specified or misspelled username, as long as the domain name is correct. [...]]]></description>
			<content:encoded><![CDATA[<p><span class="mediumtext">A wildcard DNS record is a catch all record in a DNS zone that will match all non-existent requests for a domain name. Just like whenever you setup &#8220;catch all&#8221; or &#8220;nobody&#8221; email account, that will act as a &#8220;catch-all&#8221; account for any non-specified or misspelled username, as long as the domain name is correct. Then you will be able to retrieve these messages at the mail account you specify. So Wildcard DNS is just like that but is used on domain aliases of host name. On another wold you can also call it as Catch all Sub domains.<span id="more-118"></span></span></p>
<p>For example I have setup Wildcard DNS on domain <span class="mediumtext">zeroarticles.info, I have not created any subdomain/</span><span class="mediumtext">aliases on that domain. So</span> if someone visits profile.zeroarticles.info the wildcard will forward that user to www.<span class="mediumtext"></span><span class="mediumtext">zeroarticles.info, same thing applied on test</span><span class="mediumtext">.zeroarticles.info, abc.</span><span class="mediumtext">profile.zeroarticles.info</span></p>
<p>That means everything which comes as <span class="mediumtext">domain aliases will be forwarded to </span><span class="mediumtext">www.</span><span class="mediumtext"></span><span class="mediumtext">zeroarticles.info, so we can technically call that *.</span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext">zeroarticles.info will forward to host name.</span></p>
<p>(Note: I have added domain redirection for www.<span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext">zeroarticles.info</span> to www.myblog.com.np, so Wildcard DNS will point anything to the <span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext"></span><span class="mediumtext">www.zeroarticles.info</span> and my .htaccess code will then redirected to <span class="mediumtext">www.myblog.com.np</span> | Don&#8217;t be confused on that thing.)</p>
<p>Setting-up wildcard DNS must require access to  Editing DNS Zone and httpd.conf</p>
<p>Here is the easy process for setting up Wildcard DNS on your linux system.</p>
<p><strong>Step 1:</strong></p>
<p>Add a New &#8216;A&#8217; Record for your domai. You&#8217;ll need to put an * in the first box, followed by adding your server IP address in place of &#8220;205.234.97.76&#8243;. Your IP address should be in one of the other entries in this screen where you can easily copy/paste it.</p>
<p>Here is a screen shot of what it looks like:</p>
<p><a href="http://www.myblog.com.np/wp-content/uploads/2007/09/wildcard_editdns.jpg" title="Wildcard - DNS Edit"><img src="http://www.myblog.com.np/wp-content/uploads/2007/09/wildcard_editdns.jpg" title="Wildcard - DNS Edit" alt="Wildcard - DNS Edit" border="0" height="36" width="482" /></a></p>
<p><strong>Step 2 :</strong></p>
<p>Find your domain entry on <span class="mediumtext">httpd.conf edit it and save it.</span></p>
<p>What you are going to do here, is edit the line that looks like:</p>
<p>ServerAlias yourdomain.com<br />
to:<br />
ServerAlias: *.yourdomain.com yourdomain.com</p>
<p><span class="mediumtext">It must be like below after editing:</span></p>
<p><a href="http://www.myblog.com.np/wp-content/uploads/2007/09/ssh_wildcard.jpg" title="Wildcard - httpd Edit"><img src="http://www.myblog.com.np/wp-content/uploads/2007/09/ssh_wildcard.jpg" title="Wildcard - httpd Edit" alt="Wildcard - httpd Edit" border="0" height="303" width="482" /></a></p>
<p>Now the Wildcard DNS is ready for your domain.</p>
<p>Please Note That If you want to run more than one website on the same IP address, you need to have a NameVirtualHost directive. Edit your httpd.conf, and add the following before your first VirtualHost directive:</p>
<blockquote><p>NameVirtualHost IPadress:80</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/09/03/what-is-a-wildcard-dns/feed/</wfw:commentRss>
		</item>
		<item>
		<title>.htaccess Tutorial - Directory Listing</title>
		<link>http://www.myblog.com.np/2007/08/30/htaccess-tutorial-directory-listing/</link>
		<comments>http://www.myblog.com.np/2007/08/30/htaccess-tutorial-directory-listing/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 11:37:15 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/08/30/htaccess-tutorial-directory-listing/</guid>
		<description><![CDATA[ When a web browser is pointed to a directory on your web site which does not have an index.html file in it, the files in that directory can be listed on a web page.
1. Enable/Disable Directory Listing
To have the web server produce a list of files for such directories, use the below line in [...]]]></description>
			<content:encoded><![CDATA[<p> <font face="verdana, Arial, Helvetica">When a web browser is pointed to a directory on your web site which does not have an index.html file in it, the files in that directory can be listed on a web page.</font><span id="more-117"></span></p>
<p><font face="verdana, Arial, Helvetica"><strong><u>1. Enable/Disable Directory Listing</u></strong></font></p>
<p><font face="verdana, Arial, Helvetica">To have the web server produce a list of files for such directories, use the below line in your .htaccess.</font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="158">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   Options +Indexes </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica">To have an error (403) returned instead, use this line.</font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="158">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   Options -Indexes </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica"><strong><u>2. Listing Style</u></strong></font></p>
<p><font face="verdana, Arial, Helvetica">Either a basic list of files can be shown, or a &#8216;fancy&#8217; list including icons, file size, modification date and more.</font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="204">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   IndexOptions +FancyIndexing </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica">Add this to your .htaccess file to use the &#8216;fancy&#8217; style.  </font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="210">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   IndexOptions -FancyIndexing </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica">Use the above line if you prefer a more basic file list.</font></p>
<p><font face="verdana, Arial, Helvetica"><strong><u>3. Ignore Files</u></strong></font></p>
<p><font face="verdana, Arial, Helvetica">Let&#8217;s say you have a directory with .jpg, .gif and .png image files. You only want the .png files to show in the directory listings. Add this line to your .htaccess.  </font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="189">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   IndexIgnore *.gif *.jpg  </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica">The web server now ignores the .gif and .jpg files.</font></p>
<p><font face="verdana, Arial, Helvetica"><strong><u>4. Modify Index File</u></strong></font></p>
<p><font face="verdana, Arial, Helvetica">Maybe you don&#8217;t want a list of the files, you want a specific file to be shown instead. You could upload an index.html file in this directory. There is another way.</font></p>
<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="1" height="22" width="201">
<tr bgcolor="#ffffff">
<td><font color="green" size="-2">   DirectoryIndex myfile.html </font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><font face="verdana, Arial, Helvetica">Instead of listing the files, web page myfile.html will now be shown for this directory and its subdirectories.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/08/30/htaccess-tutorial-directory-listing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WhatIsMyIP.com clone script</title>
		<link>http://www.myblog.com.np/2007/07/28/whatismyipcom-clone-script/</link>
		<comments>http://www.myblog.com.np/2007/07/28/whatismyipcom-clone-script/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 20:08:14 +0000</pubDate>
		<dc:creator>Prakash Thapa</dc:creator>
		
		<guid isPermaLink="false">http://www.myblog.com.np/2007/07/28/whatismyipcom-clone-script/</guid>
		<description><![CDATA[What Is MyIP is the fastest and easiest way to determine your IP address.  Easy to configure. Using this simple script your can even run same site like WhatIsMyIP.com which have been getting millions of visitors every day and making a huge  $$$ bucks every hour. WhatIsMyIP.com clone script
]]></description>
			<content:encoded><![CDATA[<p><span id="intelliTXT">What Is MyIP is the fastest and easiest way to determine your IP address.  Easy to configure. Using this simple script your can even run same site like WhatIsMyIP.com which have been getting millions of visitors every day and making a huge <img src='http://www.myblog.com.np/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> $$$ bucks every hour. </span><a href="http://www.myblog.com.np/wp-content/uploads/2007/07/whatismyipcom-clone.zip" title="WhatIsMyIP.com clone script">WhatIsMyIP.com clone script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myblog.com.np/2007/07/28/whatismyipcom-clone-script/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
