<?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>eNaresh.com</title>
	<atom:link href="http://enaresh.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://enaresh.com</link>
	<description></description>
	<pubDate>Fri, 05 Dec 2008 04:30:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Not Dead - Yet</title>
		<link>http://enaresh.com/2008/12/04/not-dead-yet/</link>
		<comments>http://enaresh.com/2008/12/04/not-dead-yet/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 04:30:26 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=927</guid>
		<description><![CDATA[Hey, I&#8217;ve been away from the computer for a few days because I&#8217;ve been sick.  I&#8217;m still recovering, but the worst has passed.
I just checked my email and saw quite a few concerned emails from people wondering where I was.  jail?  6 feet under?!  I&#8217;m here and doing fine.  Posting [...]]]></description>
			<content:encoded><![CDATA[<p>Hey, I&#8217;ve been away from the computer for a few days because I&#8217;ve been sick.  I&#8217;m still recovering, but the worst has passed.</p>
<p>I just checked my email and saw quite a few concerned emails from people wondering where I was.  jail?  6 feet under?!  I&#8217;m here and doing fine.  Posting will resume as usual tomorrow, starting with some exciting SiteRose Beta information.  This will be your first chance to get your hands dirty with some of the SiteRose features.  </p>
<p>The beta information will be open to only a few people, so you might want to <a href="http://enaresh.com/forum/index.php?act=Reg&#038;CODE=00">sign up</a> so your chances of getting in are better.  </p>
<p>See you tomorrow!</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/12/04/not-dead-yet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SiteRose Beta Forum Released</title>
		<link>http://enaresh.com/2008/11/23/siterose-beta-forum-released/</link>
		<comments>http://enaresh.com/2008/11/23/siterose-beta-forum-released/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 20:53:46 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=922</guid>
		<description><![CDATA[ We&#8217;ve released the SiteRose Beta Forum to the public last night.  It has all the forums that SiteRose will have after launch, and all posts, members, etc will be copied over to the main site.
You can sign up for the SiteRose beta forum at http://enaresh.com/forum.  Stop by and introduce yourself.
We also have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://enaresh.com/forum"><img src="http://enaresh.com/wp-content/uploads/2008/11/siteroseforum.jpg" alt="siterose beta forum released" align="left" style="padding-top: 0px;" /></a> We&#8217;ve released the <a href="http://enaresh.com/forum">SiteRose Beta Forum</a> to the public last night.  It has all the forums that SiteRose will have after launch, and all posts, members, etc will be copied over to the main site.</p>
<p>You can sign up for the SiteRose beta forum at <a href="http://enaresh.com/forum">http://enaresh.com/forum</a>.  Stop by and <a href="http://enaresh.com/forum/index.php?showforum=24">introduce yourself</a>.</p>
<p>We also have a brand new preview screenshot of SiteRose <a href="http://enaresh.com/forum/index.php?showtopic=9">up on the forums</a>.  It&#8217;s a backup feature - SiteRose can automatically backup your website for free.  Check it out, and <a href="http://enaresh.com/forum/index.php?showtopic=9">post your thoughts</a></p>
<p>This preview was released to the RSS subscribers a day in advance.  Sign up for email updates <a href="http://feedburner.google.com/fb/a/mailverify?uri=enareshcom&#038;loc=en_US">here</a> with FeedBurner.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/23/siterose-beta-forum-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How Much Email Spam Do You Get?</title>
		<link>http://enaresh.com/2008/11/19/how-much-email-spam-do-you-get/</link>
		<comments>http://enaresh.com/2008/11/19/how-much-email-spam-do-you-get/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 09:55:19 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=905</guid>
		<description><![CDATA[McColo Corp, a small California based web hosting company was shut down last week and the results of this closure were amazing.  Various internet security groups reported a drop in email spam by 66-80 percent after the plug was pulled.
McColo reportedly had servers used in email spam, botnets, fake security software, and even hosted [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://enaresh.com/2008/11/19/how-much-email-spam-do-you-receive#respond"><img src="http://enaresh.com/wp-content/uploads/2008/11/spam_post_image2.jpg" alt="how many spam emails do you receive?" align="left" style="padding-top: 0px;" /></a>McColo Corp, a small California based web hosting company was <a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/11/12/AR2008111200658_pf.html">shut down last week</a> and the results of this closure were amazing.  Various internet security groups reported a <a href="http://www.securitymanagement.com/news/spam-falls-worldwide-after-web-hosting-companys-servers-disconnected-004861">drop in email spam by 66-80 percent</a> after the plug was pulled.</p>
<p>McColo reportedly had servers used in email spam, botnets, fake security software, and even hosted 40 child pornography websites.</p>
<p><a href="http://leoville.com/">Leo Laporte</a>, on his weekly syndicated radio show, <a href="http://twit.tv/ttg509">discussed the closure</a> and suggested that a federal law be passed requiring internet service providers to verify that all emails sent have a return address belonging to a customer.  While I don&#8217;t agree with this because of my Libertarian views, I think ISPs should implement this voluntarily.  It would greatly reduce the load on their network - both because spam emails would be harder to send, and their incoming mail servers would have less email to deal with.</p>
<h2>Check Your Spam Folder</h2>
<p>Check your spam folder, but <a href="#tips">be careful not to open any spam emails</a>.  How many spam emails do you receive weekly?  I receive about 14 spam emails a day which works out to about 100 spam emails weekly.  However, I <strong>never</strong> get spam in my inbox.  Gmail does a pretty damn good job of blocking it.</p>
<p>Post your spam stats in the <a href="http://enaresh.com/2008/11/19/how-much-email-spam-do-you-receive#respond">comments</a>.  Do you get spam emails in your inbox?  Who&#8217;s your email provider?<br />
<a name="tips"> </a></p>
<h2>Preventing Spam</h2>
<p>While we&#8217;re on the topic of spam, here&#8217;s a few good tips for reducing the amount of spam you get.</p>
<ul>
<li>Don&#8217;t Open Spam - Some spammers use images in spam emails that call home when the image is viewed.  This means that spammers can figure out which email addresses are active, and which keywords/subject lines are attracting more readers.</li>
<li>Use Alias email addresses when registering for &#8220;<em>shady</em>&#8221; websites.  Use services like <a href="http://sneakemail.com/">Sneekemail.com</a> or use an <a href="http://lifehacker.com/software/gmail/instant-disposable-gmail-addresses-144397.php">easy instant disposable gmail address</a>
<li>Refrain from posting your email address publicly online without obfuscating the address.  I don&#8217;t usually follow this rule, mainly because spam isn&#8217;t that big of an issue to me.  Also, I&#8217;m pretty sure spam bots can figure out that &#8220;naresh [at] enaresh.com&#8221; probably means &#8220;naresh@enaresh.com&#8221;.</li>
</ul>
<p>Have any other tips for reducing the amount of spam you receive?  <a href="http://enaresh.com/2008/11/19/how-much-email-spam-do-you-receive#respond">Post a comment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/19/how-much-email-spam-do-you-get/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amazon Launches CloudFront</title>
		<link>http://enaresh.com/2008/11/19/amazon-launches-cloudfront/</link>
		<comments>http://enaresh.com/2008/11/19/amazon-launches-cloudfront/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 09:23:19 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[amazon cloudfront]]></category>

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

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

		<guid isPermaLink="false">http://enaresh.com/?p=915</guid>
		<description><![CDATA[Amazon just launched a new service as part of AWS (Amazon Web Services) called CloudFront.  It&#8217;s a new no-contract content delivery network intended to compete with companies such as BitGravity and CacheFly.  
Unlike other CDNs (Content Delivery Networks), CloudFront requires no contracts, and appears to be quite cost effective - you pay per [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/cloudfront/"><img src="http://enaresh.com/wp-content/uploads/2008/11/cloudfront.jpg" alt="amazon cloudfront launched" style="padding-top:0px;" align="left" /></a>Amazon just launched a new service as part of <a href="http://aws.amazon.com">AWS (Amazon Web Services)</a> called CloudFront.  It&#8217;s a new no-contract content delivery network intended to compete with companies such as <a href="http://bitgravity.com/">BitGravity</a> and <a href="http://cachefly.com">CacheFly</a>.  </p>
<p>Unlike other CDNs (Content Delivery Networks), CloudFront requires no contracts, and appears to be quite cost effective - you pay per GB of storage and transfer, not a set price that doesn&#8217;t change based on your usage.</p>
<h2>Ok, but what does this mean for me?</h2>
<p>This might mean a bit more to you than you&#8217;d think.  If you&#8217;re a podcaster, owner of a social network site, or own a website that hosts quite a few videos, mp3s, or other streaming media files, this might be something you want to look into.  CloudFront caches files across their network of servers and delivers your media from the server closest to your user.  </p>
<p>Shaun, a reader of eNaresh, could use CloudFront for his podcast <a href="http://wantfrieswiththat.org/">WantFriesWithThat</a> to host the episodes.  Rather than hosting the MP3s on their web server, they could migrate to CloudFront and provide blazing fast downloads of the episodes for very little cost.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/19/amazon-launches-cloudfront/feed/</wfw:commentRss>
		</item>
		<item>
		<title>eNaresh Tutorial Section Launched</title>
		<link>http://enaresh.com/2008/11/18/enaresh-tutorial-section-launched/</link>
		<comments>http://enaresh.com/2008/11/18/enaresh-tutorial-section-launched/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 12:29:52 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=887</guid>
		<description><![CDATA[I&#8217;m pleased to announce that tutorials.eNaresh.com has been released.  It&#8217;s a new section of the site sponsored by Eleven2 Web Hosting.  
Tutorials.eNaresh.com is the place to go to view a complete listing of tutorials here on eNaresh.  I&#8217;ve added the most recent tutorials and each tutorial I write will appear there.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tutorials.eNaresh.com"><img src="http://enaresh.com/wp-content/uploads/2008/11/tutsection.jpg" alt="eNaresh Tutorial Section" align="left" style="padding-top: 0px;" /></a>I&#8217;m pleased to announce that <a href="http://tutorials.eNaresh.com">tutorials.eNaresh.com</a> has been released.  It&#8217;s a new section of the site sponsored by <a href="http://eleven2.com">Eleven2 Web Hosting</a>.  </p>
<p>Tutorials.eNaresh.com is the place to go to view a complete listing of tutorials here on eNaresh.  I&#8217;ve added the most recent tutorials and each tutorial I write will appear there.  I&#8217;m working on a few other community oriented features for this section that will be added in the coming days.</p>
<h2>Requesting Tutorials</h2>
<p>There&#8217;s a new system for requesting tutorials.  Rather than emailing me suggestions, just go to <a href="http://tutorials.enaresh.com">tutorials.eNaresh.com</a> and enter your request in the textarea on the right side of the page.  I&#8217;ll try to write a tutorial for every request I receive.</p>
<h2>Eleven2?  Why Are They Sponsoring You?</h2>
<p>Eleven2 is sponsoring eNaresh because donations for hosting didn&#8217;t come in like I had hoped they would.  A big thank you goes out to <a href="http://twitter.com/torchstar">Leslie Michel</a> and <a href="http://cyruswu.com/wp/">Cyrus Kafai Wu</a> for their donations.  To keep eNaresh alive for the foreseeable future, I had to seek a sponsorship.  </p>
<h2>I Need Your Feedback</h2>
<p>I haven&#8217;t beta tested this feature at all.  If you don&#8217;t like the way something looks, or you have a few suggestions to make it look better, please <a href="http://enaresh.com/2008/11/18/enaresh-tutorial-section-launched#respond">post a comment</a>.</p>
<h2>A Few Other Updates</h2>
<p>I&#8217;ve implemented the bonus feature for the RSS feed.  I&#8217;ll start posting bonuses for RSS subscribers sometime soon - maybe even tonight.  <a href="http://enaresh.com/2008/11/09/siterose-previews-and-more-by-rss-email/">More Info</a>.</p>
<p>Also, the <a href="http://enaresh.com/about/">about me</a> page has been updated.  It now has my up-to-date contact information (new phone number), and has my advertising and freelance rates.</p>
<p>I&#8217;ve also added an &#8220;<a href="http://enaresh.com/online-presence/">Online Presence</a>&#8221; page which shows my Flickr, Twitter, and Last.fm.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/18/enaresh-tutorial-section-launched/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Daily Tutorial: Count The Number Of Chatters In IRC</title>
		<link>http://enaresh.com/2008/11/18/daily-tutorial-count-the-number-of-chatters-in-irc/</link>
		<comments>http://enaresh.com/2008/11/18/daily-tutorial-count-the-number-of-chatters-in-irc/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 07:19:00 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[count chatters]]></category>

		<category><![CDATA[count irc nicks]]></category>

		<category><![CDATA[count nicks]]></category>

		<category><![CDATA[count number of irc users]]></category>

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

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

		<category><![CDATA[php tutorial]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=862</guid>
		<description><![CDATA[In honor of IRCNode&#8217;s return, there will be several IRC related tutorials posted today.  Daily tutorials start up again today, and I&#8217;ll keep going 30 days from now to apologize for my disappearance.
IRCNode&#8217;s website isn&#8217;t back up yet, but the IRC network itself is doing well.  Just connect to irc.ircnode.org or use the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eleven2.com"><img align="right" style="padding-top: 0px;" src="http://enaresh.com/wp-content/uploads/2008/11/presented_by.gif" border="0" alt="Eleven2" /></a>In honor of <a href="http://ircnode.org">IRCNode</a>&#8217;s return, there will be several IRC related tutorials posted today.  Daily tutorials start up again today, and I&#8217;ll keep going 30 days from now to apologize for my disappearance.</p>
<p>IRCNode&#8217;s website isn&#8217;t back up yet, but the IRC network itself is doing well.  Just connect to irc.ircnode.org or use the <a href="http://enaresh.com/ircnode.php">Mibbit Web Client</a>.  Be sure to come hang out in #lobby.</p>
<h2>The Tutorial</h2>
<p>As with all my tutorials, I put the instructions inside the code as comments.  The instructions are preceded by two back slashes (//) and are generally found below the line they are explaining.</p>
<p>If you have any problems with this tutorial, please <a href="http://enaresh.com/2008/11/18/daily-tutorial-count-the-number-of-chatters-in-irc#respond">post a comment</a> or email me at naresh@eNaresh.com.</p>
<div style="width: 610px; overflow: hidden;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #990000;">set_time_limit</span><span style="color: #009900;">&#40;</span><span style="color:#800080;">0</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// This script *might* take a while, so disable the time limit.</span>
&nbsp;
	<span style="color: #000088;">$socket</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fsockopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;irc.ircnode.org&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6667</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// We'll use fsockopen to connect to the IRC network.  The second parameter is the port number.</span>
	<span style="color: #666666; font-style: italic;">// Change irc.ircnode.org to the IRC network you want to conncet to.</span>
&nbsp;
	<span style="color: #990000;">sleep</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// Wait 3 seconds for the script to connect before setting the bot's nick name.</span>
	<span style="color: #666666; font-style: italic;">// If the script doesn't work, try increasing this nunmber.  3 seconds seems to work well for most networks though.</span>
&nbsp;
	<span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;USER Counting eNaresh.com eN :eN Bot<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// Give IRC some information about the bot.  Required for connecting.</span>
&nbsp;
	<span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;NICK [Counting]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// Tell IRC that the username should be [Counting].</span>
	<span style="color: #666666; font-style: italic;">// This bot doesn't connect to any channels, but needs a nick name</span>
&nbsp;
&nbsp;
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// For each line of data, execute the code inside the brackets.</span>
&nbsp;
		<span style="color: #000088;">$ex</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="">' '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span>;
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ex</span><span style="color: #009900;">&#91;</span><span style="color:#800080;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;PING&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// If the IRCd PINGs, be sure to PONG.</span>
			<span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;PONG &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ex</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;$data&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Current Local Users&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// This script looks for the text &quot;Current Local Users&quot;.  If the line contains this text, the code</span>
			<span style="color: #666666; font-style: italic;">// inside these brackets will be executed.</span>
&nbsp;
			<span style="color: #000088;">$first</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Current Local Users: &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span>;
			<span style="color: #666666; font-style: italic;">// Separate the message from the IRCD after &quot;Current Local Users&quot;.</span>
			<span style="color: #666666; font-style: italic;">// Everything before &quot;Current Local Users: &quot; is in $first[0]</span>
			<span style="color: #666666; font-style: italic;">// Everything after &quot;Current Local Users: &quot; is in $first[1]</span>
&nbsp;
			<span style="color: #000088;">$last</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; Max:&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$first</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>;
			<span style="color: #666666; font-style: italic;">// Separate message again.  The number of local users is directly after the text &quot;Current Local Users: &quot;,</span>
			<span style="color: #666666; font-style: italic;">// so we use $first[1] as the string to separate.</span>
&nbsp;
			<span style="color: #000088;">$last</span><span style="color: #009900;">&#91;</span><span style="color:#800080;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$last</span><span style="color: #009900;">&#91;</span><span style="color:#800080;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span>;
			<span style="color: #666666; font-style: italic;">// Subtract 1 from the number of users, so we don't count the bot.</span>
&nbsp;
			<span style="color: #990000;">echo</span> <span style="">'&lt;strong&gt;Current Chatters:&lt;/strong&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$last</span><span style="color: #009900;">&#91;</span><span style="color:#800080;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="">'&lt;br /&gt;
			&lt;strong&gt;Maximum Chatters:&lt;/strong&gt; '</span> <span style="color: #339933;">.</span>  <span style="color: #000088;">$last</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>;
			<span style="color: #666666; font-style: italic;">// Display the data</span>
&nbsp;
			<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #009900;">&#41;</span>;
			<span style="color: #666666; font-style: italic;">// Close the socket.</span>
&nbsp;
			<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
			<span style="color: #666666; font-style: italic;">// Kill the script so it doesn't keep trying to get data.</span>
			<span style="color: #666666; font-style: italic;">// The bot will disconnect from IRC.</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #666666; font-style: italic;">// Close the socket.  Just in case the number of current chatters never shows up.</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</div>
<p>I&#8217;d only use this code on a CRON job and save the data to a MySQL database, because it takes a few seconds to run.  If you don&#8217;t have CRON jobs, email me (naresh@eNaresh.com), and I can set it up on my server.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/18/daily-tutorial-count-the-number-of-chatters-in-irc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>So, I Disappeared.</title>
		<link>http://enaresh.com/2008/11/12/so-i-disappeared/</link>
		<comments>http://enaresh.com/2008/11/12/so-i-disappeared/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 22:36:30 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=860</guid>
		<description><![CDATA[Hey guys,
This will be a short post, sorry.  I posted last Friday that I got a job with an organization called CoPIRG.  I started on Monday and have been working since then.  Last night I sprained my ankle on someones crappy porch, which is why I&#8217;m not working today.
My hours have been [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys,</p>
<p>This will be a short post, sorry.  I posted last Friday that I got a job with an organization called CoPIRG.  I started on Monday and have been working since then.  Last night I sprained my ankle on someones crappy porch, which is why I&#8217;m not working today.</p>
<p>My hours have been 12:30-10PM.  To get there by 12:30, I have to catch the bus at 10 AM, which left no time for posting.  Also, I left my laptop at my mom&#8217;s house a few days ago.</p>
<p>So, I&#8217;ll make up the tutorials I missed tomorrow.  I&#8217;m quitting that miserable job because I got a better one already.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/12/so-i-disappeared/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bonuses For RSS Subscribers Only</title>
		<link>http://enaresh.com/2008/11/09/siterose-previews-and-more-by-rss-email/</link>
		<comments>http://enaresh.com/2008/11/09/siterose-previews-and-more-by-rss-email/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 22:52:13 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=839</guid>
		<description><![CDATA[Starting next week there will be some bonuses for RSS subscribers either by email or using an RSS reader.  Here&#8217;s an overview of what the bonuses will be.
 
What&#8217;s going on the feed?
I&#8217;ll be posting SiteRose video previews, SiteRose beta information, bonus tutorials, code snippits, and other goodies.  They&#8217;ll be going directly to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://feeds.feedburner.com/enareshcom"><img src="http://enaresh.com/wp-content/uploads/2008/11/rss.gif" alt="subscribe to the rss" style="padding-top: 0px;" align="left" /></a>Starting next week there will be some bonuses for RSS subscribers either by email or using an RSS reader.  Here&#8217;s an overview of what the bonuses will be.</p>
<div style="clear:both;"> </div>
<p><strong>What&#8217;s going on the feed?</strong></p>
<p>I&#8217;ll be posting <a href="http://siterose.com">SiteRose</a> video previews, <u>SiteRose beta information</u>, bonus tutorials, code snippits, and other goodies.  They&#8217;ll be going directly to the feed, and will not be added to the site.</p>
<p>You can subscribe to the <a href="http://feeds.feedburner.com/enareshcom">RSS Feed</a> with an <a href="http://reader.google.com">RSS Reader</a>, but the easiest way to <strong>enter your email address in the &#8220;Subscribe By Email&#8221; box in the sidebar</strong></p>
<p>There will still be previews, tutorials, etc posted here on eNaresh, RSS subscribers will just get a few extras and get previews before they&#8217;re added to the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/09/siterose-previews-and-more-by-rss-email/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Requested: Ban System Admin Panel</title>
		<link>http://enaresh.com/2008/11/09/requested-ban-system-admin-panel/</link>
		<comments>http://enaresh.com/2008/11/09/requested-ban-system-admin-panel/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 21:00:21 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=835</guid>
		<description><![CDATA[This isn&#8217;t today&#8217;s tutorial.  Today&#8217;s tutorial was on creating daily backups with PHP.
Cyrus Kafai Wu requested that I write an admin control panel for the ban system posted yesterday.  Here you go, Cyrus.

The Code
As always, read the comments.  Keep this page in a password protected directory or at least out of the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://enaresh.com/wp-content/uploads/2008/11/banned-admin.jpg" alt="banned admin control panel" align="left" style="padding-top: 0px" />This isn&#8217;t today&#8217;s tutorial.  Today&#8217;s tutorial was on <a href="http://enaresh.com/2008/11/09/daily-php-tutorial-create-easy-daily-backups/">creating daily backups with PHP</a>.</p>
<p>Cyrus Kafai Wu requested that I write an admin control panel for the <a href="http://enaresh.com/2008/11/08/daily-php-tutorial-php-ban-system/">ban system posted yesterday</a>.  Here you go, Cyrus.</p>
<p><span id="more-835"></span></p>
<h2>The Code</h2>
<p>As always, read the comments.  <strong>Keep this page in a password protected directory or at least out of the public eye.</strong></p>
<div style="width: 610px; overflow: hidden;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
	<span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;DB USERNAME&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;DB PASS&quot;</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DB NAME&quot;</span><span style="color: #009900;">&#41;</span>;
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span>unban<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// If there's a ?unban= in the URL, the code inside these { } will be executed.</span>
		<span style="color: #666666; font-style: italic;">// This part is for unbanning visitors.</span>
&nbsp;
		<span style="color: #000088;">$unban</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span>unban<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// Clean the variable just in case...We don't want the wrong person finding this page and doing SQL injections</span>
&nbsp;
		<span style="color: #000088;">$delete</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DELETE FROM `banned` where `id`  = '$unban'&quot;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// Delete the ban from the database.</span>
&nbsp;
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;That IP has been unbanned!&quot;</span>;
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'ip'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'reason'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// The form has been submitted.  Let's ban the user based on the submitted form info.</span>
&nbsp;
		<span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>ip<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #000088;">$reason</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>reason<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// Clean the strings just in case...SQL injection = bad.</span>
&nbsp;
		<span style="color: #000088;">$ban</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO `banned` (`id` ,`ip` , `reason`) VALUES (NULL , '$ip', '$reason');&quot;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// Add the ban to the database.</span>
&nbsp;
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;IP Banned.&quot;</span>;
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;&lt;form method=<span style="color: #000099; font-weight: bold;">\&quot;</span>post<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;
		Ban This IP: &lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>ip<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&lt;br /&gt;
		Reason: &lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>reason<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&lt;br /&gt;
		&lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>submit<span style="color: #000099; font-weight: bold;">\&quot;</span> value=<span style="color: #000099; font-weight: bold;">\&quot;</span>ban<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>ban<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;
		&lt;/form&gt;&lt;h3&gt;Current Bans&lt;/h3&gt;&quot;</span>;
		<span style="color: #666666; font-style: italic;">// The above shows a form for adding a ban.  </span>
&nbsp;
		<span style="color: #000088;">$get_bans</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * from `banned`&quot;</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// Query the database for all current bans.</span>
&nbsp;
		<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bans</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$get_bans</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// Create an array for each ban and display the line below.</span>
			<span style="color: #990000;">echo</span> <span style="color: #000088;">$bans</span><span style="color: #009900;">&#91;</span>ip<span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="">' - &lt;a href=&quot;?unban='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$bans</span><span style="color: #009900;">&#91;</span>id<span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="">'&quot;&gt;Unban&lt;/a&gt;&lt;br /&gt;'</span>;
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</div>
<p>There you have it, Cyrus.  If you have any problems, <a href="http://enaresh.com/2008/11/09/lrequested-ban-system-admin-panel/">post a comment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/09/requested-ban-system-admin-panel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Daily PHP Tutorial: Create Easy Daily Backups</title>
		<link>http://enaresh.com/2008/11/09/daily-php-tutorial-create-easy-daily-backups/</link>
		<comments>http://enaresh.com/2008/11/09/daily-php-tutorial-create-easy-daily-backups/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 16:00:54 +0000</pubDate>
		<dc:creator>Naresh</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://enaresh.com/?p=828</guid>
		<description><![CDATA[We&#8217;re now 9 days in to the tutorial marathon.  I&#8217;m having a good time with this, and I hope you are too!
This tutorial was requested in the comments a few days ago.  It&#8217;s a PHP script that will allow you to easily create daily backups of your website.  It does require that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://enaresh.com/2008/11/09/daily-php-tutorial-create-easy-daily-backups"><img src="http://enaresh.com/wp-content/uploads/2008/11/backups1.jpg" alt="backup website with php" align="left" style="padding-top:0px" /></a>We&#8217;re now 9 days in to the tutorial marathon.  I&#8217;m having a good time with this, and I hope you are too!</p>
<p>This tutorial was requested in the comments a few days ago.  It&#8217;s a PHP script that will allow you to easily create daily backups of your website.  It does require that you are on a linux web server.</p>
<p>The &#8220;<em><a href="http://www.computerhope.com/unix/utar.htm">tar</a></em>&#8221; command in linux allows you to create .tar archives of your directories.  We&#8217;re going to use that command in conjunction with the &#8220;<em><a href="http://us3.php.net/manual/en/function.system.php">system</a></em>&#8221; PHP Function.</p>
<h2>The Code</h2>
<p>As with all my tutorials, the instructions are included inside the code so even the copy and pasters can learn a thing or two.  They&#8217;re inside the code as comments, or lines preceded with two backslashes.</p>
<div style="width: 610px; overflow: hidden;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
	<span style="color: #000088;">$your_email</span> <span style="color: #339933;">=</span> <span style="">'naresh@eNaresh.com'</span>;
	<span style="color: #666666; font-style: italic;">// Change the above to your email address.  This is used to send emails informing you of the status of the backup.</span>
&nbsp;
	<span style="color: #000088;">$directory</span> <span style="color: #339933;">=</span> <span style="">'/home/ragsites/public_html/enaresh/wp-content/themes/Mark'</span>;
	<span style="color: #666666; font-style: italic;">// Change this to the path of the directory you wish to backup.  To backup the directory this file is located in, simply change it to a period.</span>
&nbsp;
	<span style="color: #000088;">$backup_file</span> <span style="color: #339933;">=</span> <span style="">'/home/ragsites/backups/backup'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;MdY&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="">'.tar'</span>;
	<span style="color: #666666; font-style: italic;">// The location where the backup will be saved.  Keep this out of your public_html folder, if possible.</span>
	<span style="color: #666666; font-style: italic;">// In my example filename, date(MdY) adds the date in this format to the filename: Nov092008</span>
&nbsp;
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">system</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;tar cvf $backup_file $directory&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Attempts to backup the directory using the &quot;tar&quot; linux command.</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Inside this set of brackets, the backup was successful.</span>
&nbsp;
		<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$your_email</span><span style="color: #339933;">,</span> <span style="">'Backup Complete'</span><span style="color: #339933;">,</span> <span style="">'A backup of &quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$directory</span> <span style="color: #339933;">.</span> <span style="">'&quot; has been created.  It has been saved at &quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$backup_file</span> <span style="color: #339933;">.</span> <span style="">'&quot;'</span><span style="color: #009900;">&#41;</span>;
		<span style="color: #666666; font-style: italic;">// The above line sends an email similar to:</span>
		<span style="color: #666666; font-style: italic;">// A backup of &quot;/home/ragsites/public_html/enaresh/wp-content/themes/Mark&quot; has been created.  It has been saved at &quot;/home/ragsites/backups/backupNov092008.tar&quot;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// The backup failed!  Send an email saying it failed!</span>
		<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$your_email</span><span style="color: #339933;">,</span> <span style="">'Backup Failed'</span><span style="color: #339933;">,</span> <span style="">'Your backup of &quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$directory</span> <span style="color: #339933;">.</span> <span style="">'&quot; failed!'</span><span style="color: #009900;">&#41;</span>;
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</div>
<p>Run this code with a CRON job for best results.  I wouldn&#8217;t run it more than once a day unless your files change very frequently.  <strong>Don&#8217;t have CRON Jobs?</strong>  Send me the URL of this file on your server along with how frequently you want to backup, and I&#8217;ll configure my server to trigger backups at intervals of your choice.  naresh@eNaresh.com</p>
]]></content:encoded>
			<wfw:commentRss>http://enaresh.com/2008/11/09/daily-php-tutorial-create-easy-daily-backups/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
