<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>beanBlog</title>
	<atom:link href="http://thebeanproject.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thebeanproject.wordpress.com</link>
	<description>expect the Unexpected</description>
	<lastBuildDate>Fri, 19 Jun 2009 04:10:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='thebeanproject.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>beanBlog</title>
		<link>http://thebeanproject.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://thebeanproject.wordpress.com/osd.xml" title="beanBlog" />
	<atom:link rel='hub' href='http://thebeanproject.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Auto FTP Download, Upload, and Batch file</title>
		<link>http://thebeanproject.wordpress.com/2009/06/19/auto-ftp-download-upload-and-batch-file/</link>
		<comments>http://thebeanproject.wordpress.com/2009/06/19/auto-ftp-download-upload-and-batch-file/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:55:21 +0000</pubDate>
		<dc:creator>thebeanproject</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[auto download and upload]]></category>
		<category><![CDATA[auto ftp]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[scheduled download and upload]]></category>
		<category><![CDATA[scheduled ftp]]></category>

		<guid isPermaLink="false">http://thebeanproject.wordpress.com/?p=21</guid>
		<description><![CDATA[Last month, I was told to create a script that will download files automatically from the server and upload it to another server. I was having a hard time on how to figure this out. Fortunately, I ran across Auto FTP Manager. This program allows you to connect to any FTP server and automatically upload [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=21&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last month, I was told to create a script that will download files automatically from the server and upload it to another server. I was having a hard time on how to figure this out. Fortunately, I ran across <a title="Auto FTP Manager" href="http://www.deskshare.com/afm.aspx" target="_blank">Auto FTP Manager</a>. This program allows you to connect to            any FTP server and automatically upload and download            files or synchronize directories. Since every week they have different filenames on the downloaded files, so I have to create a Batch file that will get files from the download directory and rename it according to the filenames on the other webserver. Below is the batch file that I created and saved it as <span style="color:#ff6600;">runit.bat</span>.</p>
<div style="font-family:courier new;">
<blockquote><p><span style="color:#008000;">@ECHO OFF</span></p>
<p><span style="color:#008000;">set </span>totcount=0</p>
<p><span style="color:#008000;">for</span> /f &#8220;usebackq delims=&#8221; %%a in (`dir /b *.pdf`) DO (<br />
<span style="color:#0000ff;">call </span>:s_do_sums &#8220;%%a&#8221;<br />
)</p>
<p>:<span style="color:#0000ff;">s_do_sums</span><br />
set /a totcount+=1<br />
<span style="color:#008000;">IF EXIST</span> %totcount%.pdf (<br />
<span style="color:#008000;">DEL </span>%*<br />
)<br />
<span style="color:#008000;">REN </span>%* %totcount%.pdf</p></blockquote>
</div>
<p>Using <a title="Auto FTP Manager" href="http://www.deskshare.com/afm.aspx" target="_blank">Auto FTP Manager</a> you could schedule and automate your file transfers. Therefore, I used a scheduled task to run my batch file one hour after the scheduled ftp download is ran. After that I scheduled another ftp upload to another server in one hour timespan as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thebeanproject.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thebeanproject.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thebeanproject.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=21&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thebeanproject.wordpress.com/2009/06/19/auto-ftp-download-upload-and-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4924d548e468928c42f141020d121d9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thebeanproject</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript Detect Browser</title>
		<link>http://thebeanproject.wordpress.com/2009/06/19/javascript-detect-browser/</link>
		<comments>http://thebeanproject.wordpress.com/2009/06/19/javascript-detect-browser/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:53:23 +0000</pubDate>
		<dc:creator>thebeanproject</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[browser detection]]></category>
		<category><![CDATA[detect browser]]></category>

		<guid isPermaLink="false">http://thebeanproject.wordpress.com/?p=19</guid>
		<description><![CDATA[There are many web browsers out there and some programmers are having a headache because of browser compatibility. Sometimes you just want to tell the web to execute another script if the user is using a specific browser. Here is a script that will help you determine what kind of browser does the user use. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=19&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many web browsers out there and some programmers are having a headache because of browser compatibility.  Sometimes you just want to tell the web to execute another script if the user is using a specific browser. Here is a script that will help you determine what kind of browser does the user use.</p>
<div style="font-family:courier new;">
<p><span style="color:#800000;">&lt;script language=&#8221;JavaScript&#8221;&gt;</span></p>
<p style="padding-left:30px;"><span style="color:#008000;">var </span>BrowserDetect = {</p>
<p style="padding-left:60px;">init: <span style="color:#0000ff;">function </span>() {</p>
<p style="padding-left:90px;"><span style="color:#0000ff;">this</span>.browser = <span style="color:#0000ff;">this</span>.searchString(<span style="color:#0000ff;">this</span>.dataBrowser) || <span style="color:#800000;">&#8220;An unknown browser&#8221;</span>;<span style="color:#0000ff;"><br />
this</span>.version = <span style="color:#0000ff;">this</span>.searchVersion(navigator.userAgent) || <span style="color:#0000ff;">this</span>.searchVersion(navigator.appVersion) || <span style="color:#800000;">&#8220;an unknown version&#8221;</span>;<span style="color:#0000ff;"><br />
this</span>.OS = this.searchString(<span style="color:#0000ff;">this</span>.dataOS) || <span style="color:#800000;">&#8220;an unknown OS&#8221;</span>;</p>
<p style="padding-left:60px;">},</p>
<p style="padding-left:60px;">searchString: <span style="color:#0000ff;">function </span>(data) {</p>
<p style="padding-left:90px;"><span style="color:#008000;">for </span>(<span style="color:#008000;">var </span>i=0; i&lt;data.<span style="color:#0000ff;">length</span>; i++)    {</p>
<p style="padding-left:120px;"><span style="color:#008000;">var </span>dataString = data[i].string;<span style="color:#008000;"> var </span>dataProp = data[i].prop;<span style="color:#0000ff;"><br />
this</span>.versionSearchString = data[i].versionSearch || data[i].identity;</p>
<p style="padding-left:120px;"><span style="color:#008000;">if </span>(dataString) {</p>
<p style="padding-left:150px;"><span style="color:#008000;">if </span>(dataString.indexOf(data[i].subString) != -1)</p>
<p style="padding-left:180px;"><span style="color:#0000ff;">return </span>data[i].identity;</p>
<p style="padding-left:120px;">}</p>
<p style="padding-left:120px;"><span style="color:#008000;">else if </span>(dataProp)</p>
<p style="padding-left:150px;"><span style="color:#0000ff;">return </span>data[i].identity;</p>
<p style="padding-left:90px;">}</p>
<p style="padding-left:60px;">},</p>
<p style="padding-left:60px;">searchVersion: <span style="color:#0000ff;">function </span>(dataString) {</p>
<p style="padding-left:90px;"><span style="color:#008000;">var </span>index = dataString.indexOf(<span style="color:#0000ff;">this</span>.versionSearchString);</p>
<p style="padding-left:90px;"><span style="color:#008000;">if </span>(index == -1) <span style="color:#0000ff;">return</span>;</p>
<p style="padding-left:90px;"><span style="color:#0000ff;">return </span>parseFloat(dataString.substring(index + <span style="color:#0000ff;">this</span>.versionSearchString.length + 1));</p>
<p style="padding-left:60px;">},</p>
<p style="padding-left:60px;">dataBrowser: [</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString: <span style="color:#800000;">"Chrome"</span>,<br />
identity:<span style="color:#800000;"> "Chrome"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString:<span style="color:#800000;"> "OmniWeb"</span>,<br />
versionSearch:<span style="color:#800000;"> "OmniWeb/"</span>,<br />
identity:<span style="color:#800000;"> "OmniWeb"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.vendor,<br />
subString:<span style="color:#800000;"> "Apple"</span>,<br />
identity: <span style="color:#800000;">"Safari"</span>,<br />
versionSearch: <span style="color:#800000;">"Version"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">prop: window.opera,<br />
identity: <span style="color:#800000;">"Opera"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.vendor,<br />
subString: <span style="color:#800000;">"iCab"</span>,<br />
identity: <span style="color:#800000;">"iCab"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.vendor,<br />
subString: <span style="color:#800000;">"KDE"</span>,<br />
identity: <span style="color:#800000;">"Konqueror"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString: <span style="color:#800000;">"Firefox"</span>,<br />
identity:<span style="color:#800000;"> "Firefox"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.vendor,<br />
subString: <span style="color:#800000;">"Camino"</span>,<br />
identity: <span style="color:#800000;">"Camino"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">// for newer Netscapes (6+)<br />
string: navigator.userAgent,<br />
subString:<span style="color:#800000;"> "Netscape"</span>,<br />
identity: <span style="color:#800000;">"Netscape"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString: <span style="color:#800000;">"MSIE"</span>,<br />
identity:<span style="color:#800000;"> "IE"</span>,<br />
versionSearch:<span style="color:#800000;"> "MSIE"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString:<span style="color:#800000;"> "Gecko"</span>,<br />
identity: <span style="color:#800000;">"Mozilla"</span>,<br />
versionSearch: <span style="color:#800000;">"rv"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">// for older Netscapes (4-)<br />
string: navigator.userAgent,<br />
subString:<span style="color:#800000;"> "Mozilla"</span>,<br />
identity:<span style="color:#800000;"> "Netscape"</span>,<br />
versionSearch: <span style="color:#800000;">"Mozilla"</span></p>
<p style="padding-left:90px;">}</p>
<p style="padding-left:60px;">],</p>
<p style="padding-left:60px;">dataOS : [</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.platform,<br />
subString:<span style="color:#800000;"> "Win"</span>,<br />
identity: <span style="color:#800000;">"Windows"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.platform,<br />
subString:<span style="color:#800000;"> "Mac"</span>,<br />
identity: <span style="color:#800000;">"Mac"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.userAgent,<br />
subString: <span style="color:#800000;">"iPhone"</span>,<br />
identity: <span style="color:#800000;">"iPhone/iPod"</span></p>
<p style="padding-left:90px;">},</p>
<p style="padding-left:90px;">{</p>
<p style="padding-left:120px;">string: navigator.platform,<br />
subString:<span style="color:#800000;"> "Linux"</span>,<br />
identity:<span style="color:#800000;"> "Linux"</span></p>
<p style="padding-left:90px;">}</p>
<p style="padding-left:60px;">]</p>
<p style="padding-left:30px;">};</p>
<p style="padding-left:30px;">BrowserDetect.init();</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">alert</span>(BroswerDetect.Browser);</p>
<p><span style="color:#800000;">&lt;/script&gt;</span></div>
<p>Thanks to <a title="Quirks Mode" href="http://www.quirksmode.org/" target="_blank">QuirksMode </a>that make this possible. For more detail information click <a title="Detect Browser using JavaScript" href="http://www.quirksmode.org/js/detect.html" target="_blank">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thebeanproject.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thebeanproject.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thebeanproject.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=19&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thebeanproject.wordpress.com/2009/06/19/javascript-detect-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4924d548e468928c42f141020d121d9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thebeanproject</media:title>
		</media:content>
	</item>
		<item>
		<title>Create FAVICON for your website</title>
		<link>http://thebeanproject.wordpress.com/2009/06/19/create-favicon-for-your-website/</link>
		<comments>http://thebeanproject.wordpress.com/2009/06/19/create-favicon-for-your-website/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:52:17 +0000</pubDate>
		<dc:creator>thebeanproject</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[bookmark website]]></category>
		<category><![CDATA[favico]]></category>
		<category><![CDATA[favicon]]></category>

		<guid isPermaLink="false">http://thebeanproject.wordpress.com/?p=17</guid>
		<description><![CDATA[A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16&#215;16 pixel square icon associated with a particular website or webpage. Browsers that provide favicon support typically display a page&#8217;s favicon in the browser&#8217;s Address bar and next to the page&#8217;s name in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=17&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16&#215;16 pixel square icon associated with a particular website or webpage. Browsers that provide favicon support typically display a page&#8217;s favicon in the browser&#8217;s Address bar and next to the page&#8217;s name in a list of bookmarks. Browsers that support a tabbed document interface typically show a page&#8217;s favicon next to the page&#8217;s title on the tab. &#8212; <a title="Wikipedia Favicon" href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Favicon Wiki</a></p>
<ol>
<li>First of all, create an picture 16&#215;16 and save it as .ICO  &#8212; Here is a tutorial on how to create a FAVICON <a title="PhotoshopSupport - How to create favicon" href="http://www.photoshopsupport.com/tutorials/jennifer/favicon.html" target="_blank">http://www.photoshopsupport.com/tutorials/jennifer/favicon.html</a></li>
<li>Upload it to your website</li>
<li>Add this line within your <span style="color:#0000ff;">&lt;head&gt;</span> tag &#8212; more information go to <a title="How to create FAVICON for your website" href="http://www.thesitewizard.com/archive/favicon.shtml" target="_blank">http://www.thesitewizard.com/archive/favicon.shtml</a>
<div style="font-family:courier new;">
<blockquote><tt>&lt;link REL=</tt><span style="color:#0000ff;">&#8220;SHORTCUT ICON&#8221;</span><tt> HREF=</tt><span style="color:#0000ff;">&#8220;http://yoursitedotcom.here/favicon.ico&#8221;</span><tt>&gt;</tt></p></blockquote>
</div>
</li>
</ol>
<p>You could also create a PNG or GIF for your FAVICON, but it will not work on Internet Explorer. I would recommend using a .ICO file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thebeanproject.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thebeanproject.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thebeanproject.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=17&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thebeanproject.wordpress.com/2009/06/19/create-favicon-for-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4924d548e468928c42f141020d121d9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thebeanproject</media:title>
		</media:content>
	</item>
		<item>
		<title>Block specific IP Address</title>
		<link>http://thebeanproject.wordpress.com/2009/06/19/block-specific-ip-address/</link>
		<comments>http://thebeanproject.wordpress.com/2009/06/19/block-specific-ip-address/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:51:22 +0000</pubDate>
		<dc:creator>thebeanproject</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[block ip address]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://thebeanproject.wordpress.com/?p=14</guid>
		<description><![CDATA[There are several ways of blocking specific IP Addresses. In this article I will talk about blocking IP Address using PHP, ASP, ASP.NET, and JavaScript. PHP Code: $blockedIP = array(); $blockedIP[] = &#8220;x.x.x.x&#8221;; $blockedIP[] = &#8220;x.x.x.x&#8221;; $blockedIP[] = &#8220;x.x.x.x&#8221;; $blockedIP[] = &#8220;x.x.x.x&#8221;; $incomingIP = $_SERVER["REMOTE_ADDR"]; for($i=0; $i&#60;count($blockedIP); $i++){ if($blockedIP[$i] == $incomingIP){ echo &#8220;&#60;script&#62;alert(&#8216;you are not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=14&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are several ways of blocking specific IP Addresses. In this article I will talk about blocking IP Address using PHP, ASP,  ASP.NET, and JavaScript.</p>
<p><strong>PHP Code:</strong></p>
<div style="font-family:courier new;">
<blockquote><p>$blockedIP = <span style="color:#0000ff;">array</span>();<br />
$blockedIP[] =<span style="color:#800000;"> &#8220;x.x.x.x&#8221;</span>;<br />
$blockedIP[] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;<br />
$blockedIP[] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;<br />
$blockedIP[] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;</p>
<p>$incomingIP = <span style="color:#3366ff;">$_SERVER</span>[<span style="color:#800000;">"REMOTE_ADDR"</span>];</p>
<p><span style="color:#008000;">for</span>($i=<span style="color:#ff0000;">0</span>; $i&lt;<span style="color:#0000ff;">count</span>($blockedIP); $i++){</p>
<p style="padding-left:30px;"><span style="color:#008000;">if</span>($blockedIP[$i] == $incomingIP){</p>
<p style="padding-left:60px;"><span style="color:#0000ff;">echo </span><span style="color:#800000;">&#8220;&lt;script&gt;alert(&#8216;you are not allowed to visit this site anymore&#8217;);&lt;/script&gt;&#8221;</span>;<br />
<span style="color:#0000ff;">header</span>(<span style="color:#800000;">&#8220;location: http://www.google.com&#8221;</span>);<br />
<span style="color:#008000;">break</span>;</p>
<p style="padding-left:30px;">}</p>
<p>}</p></blockquote>
</div>
<p><span style="color:#993300;"><br />
</span></p>
<p><strong>ASP Code:</strong></p>
<div style="font-family:courier new;">
<blockquote><p><span style="color:#008000;">Dim </span>blockedIP(<span style="color:#ff0000;">2</span>) <span style="color:#c0c0c0;"> &#8216;fixed size array</span><br />
blockedIP(<span style="color:#ff0000;">0</span>) = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span><br />
blockedIP(<span style="color:#ff0000;">1</span>) =<span style="color:#800000;"> &#8220;x.x.x.x&#8221;</span><br />
blockedIP(<span style="color:#ff0000;">2</span>) = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span></p>
<p><span style="color:#008000;">Dim </span>incomingIP<br />
incomingIP = Request.<span style="color:#0000ff;">ServerVariables</span>(<span style="color:#800000;">&#8220;REMOTE_ADDR&#8221;</span>)</p>
<p><span style="color:#008000;">For </span>i=<span style="color:#ff0000;">0</span> to <span style="color:#0000ff;">UBound</span>(blockedIP)</p>
<p style="padding-left:30px;"><span style="color:#008000;">if</span>(blockedIP(i) = incomingIP) then</p>
<p style="padding-left:60px;">response.write(<span style="color:#800000;">&#8220;&lt;script&gt;alert(&#8216;you are not allowed to visit this site anymore&#8217;);&lt;/script&gt;&#8221;</span>)<br />
response.redirect(<span style="color:#800000;">&#8220;http://www.google.com&#8221;</span>)<br />
<span style="color:#0000ff;">exit for</span></p>
<p style="padding-left:30px;"><span style="color:#008000;">end if</span></p>
<p><span style="color:#008000;">Next</span></p></blockquote>
</div>
<p><span style="color:#993300;"><br />
</span></p>
<p><strong>ASP.NET C# Code:</strong></p>
<div style="font-family:courier new;">
<blockquote><p><span style="color:#008000;">ArrayList </span>blockedIP = <span style="color:#0000ff;">new </span><span style="color:#008000;">ArrayList</span><span style="color:#333333;">()</span>;<br />
blockedIP.<span style="color:#0000ff;">Add</span>(<span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>);<br />
blockedIP.<span style="color:#0000ff;">Add</span>(<span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>);<br />
blockedIP.<span style="color:#0000ff;">Add</span>(<span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>);</p>
<p><span style="color:#0000ff;">string </span>incomingIP = Request.<span style="color:#0000ff;">UserHostAddress</span>;</p>
<p><span style="color:#008000;">foreach </span>(<span style="color:#0000ff;">string </span>x <span style="color:#0000ff;">in </span>blockedIP){</p>
<p style="padding-left:30px;"><span style="color:#008000;">if </span>(x == incomingIP){</p>
<p style="padding-left:60px;"><span style="color:#993366;">response.write</span>(<span style="color:#800000;">&#8220;&lt;script&gt;alert(&#8216;you are not allowed to visit this site anymore&#8217;);&lt;/script&gt;&#8221;</span>);<br />
<span style="color:#993366;">response.redirect</span>(<span style="color:#800000;">&#8220;http://www.google.com&#8221;</span>);<br />
<span style="color:#0000ff;">break</span>;</p>
<p style="padding-left:30px;">}</p>
<p>}</p></blockquote>
</div>
<p><span style="color:#993300;"><br />
</span></p>
<p><strong>JavaScript Code:</strong></p>
<div style="font-family:courier new;">
<blockquote><p>There is a <span style="color:#ff0000;">MAJOR FLAW</span> using JavaScript to blocked specific ip address. If the JavaScript is<span style="color:#ff0000;"> turned off</span> this script will <span style="color:#ff0000;">NOT WORK</span>!!.</p>
<p><span style="color:#993300;">&lt;script language=&#8221;javascript&#8221; type=&#8221;text/javascript&#8221;&gt;</span></p>
<p style="padding-left:30px;"><span style="color:#008000;">var </span>blockedIP = new <span style="color:#0000ff;">Array()</span>;</p>
<p style="padding-left:30px;">blockedIP[0] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;<br />
blockedIP[1] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;<br />
blockedIP[2] = <span style="color:#800000;">&#8220;x.x.x.x&#8221;</span>;</p>
<p style="padding-left:30px;"><span style="color:#008000;"><span style="color:#c0c0c0;">//PHP &#8211;&gt; &lt;?php echo $_SERVER["REMOTE_ADDR"]; ?&gt;</span><br />
<span style="color:#c0c0c0;">//ASP &#8211;&gt; &lt;%=</span></span><span style="color:#c0c0c0;"> Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;) %&gt;<br />
//ASP.NET &#8211;&gt; &lt;%= Request.UserHostAddress %&gt;</span><br />
<span style="color:#008000;">var </span>ip = &#8216;<span style="color:#ff0000;">&lt;?php<span style="color:#0000ff;"> </span></span> <span style="color:#3366ff;"><span style="color:#0000ff;">echo</span> $_SERVER</span>[<span style="color:#800000;">"REMOTE_ADDR"</span>];<span style="color:#ff0000;"> ?&gt;</span>&#8216;;</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">for</span>(<span style="color:#008000;">var </span>i=0;  i&lt;blockedIP.<span style="color:#0000ff;">length</span>;  i++){</p>
<p style="padding-left:60px;">if(blockedIP[i] == ip){</p>
<p style="padding-left:90px;"><span style="color:#0000ff;">alert</span>(<span style="color:#800000;">&#8220;you are not allowed to visit this site anymore&#8221;</span>);<br />
<span style="color:#800080;">window</span>.location =<span style="color:#800000;"> &#8220;http://www.google.com&#8221;</span>;<br />
break;</p>
<p style="padding-left:60px;">}</p>
<p style="padding-left:30px;">}</p>
<p><span style="color:#993300;">&lt;/script&gt;</span></p></blockquote>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thebeanproject.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thebeanproject.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thebeanproject.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=14&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thebeanproject.wordpress.com/2009/06/19/block-specific-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4924d548e468928c42f141020d121d9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thebeanproject</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Set Cookie</title>
		<link>http://thebeanproject.wordpress.com/2009/06/19/javascript-set-cookie/</link>
		<comments>http://thebeanproject.wordpress.com/2009/06/19/javascript-set-cookie/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:48:32 +0000</pubDate>
		<dc:creator>thebeanproject</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[set cookie]]></category>

		<guid isPermaLink="false">http://thebeanproject.wordpress.com/?p=12</guid>
		<description><![CDATA[function Set_Cookie( name, value, expires, path, domain, secure ) { // set time, it&#8217;s in milliseconds var today = new Date(); today.setTime( today.getTime() ); /* if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=12&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="font-family:courier new;"><span style="color:#0000ff;">function<span style="color:#800080;"> </span></span><span style="color:#800080;">Set_Cookie</span>( name, value, expires, path, domain, secure )<br />
{</p>
<p style="padding-left:30px;"><span style="color:#c0c0c0;">// set time, it&#8217;s in milliseconds</span><br />
<span style="color:#008000;">var </span>today = new <span style="color:#0000ff;">Date</span>();<br />
today.<span style="color:#0000ff;">setTime</span>( today.<span style="color:#0000ff;">getTime</span>() );</p>
<p style="padding-left:30px;"><span style="color:#c0c0c0;">/*<br />
if the expires variable is set, make the correct<br />
expires time, the current script below will set<br />
it for x number of days, to make it for hours,<br />
delete * 24, for minutes, delete * 60 * 24<br />
*/</span><br />
<span style="color:#008000;">if </span>( expires ){</p>
<p style="padding-left:60px;">expires = expires * <span style="color:#ff0000;">1000 </span>* <span style="color:#ff0000;">60 </span>* <span style="color:#ff0000;">60 </span>* <span style="color:#ff0000;">24</span>;</p>
<p style="padding-left:30px;">}</p>
<p style="padding-left:30px;"><span style="color:#008000;">var </span>expires_date = new <span style="color:#0000ff;">Date</span>( today.<span style="color:#0000ff;">getTime</span>() + (expires) );<span style="color:#993366;"><br />
document</span>.cookie = name +<span style="color:#800000;"> &#8220;=&#8221;</span> + <span style="color:#0000ff;">escape</span>( value ) +<br />
( ( expires ) ?<span style="color:#800000;"> &#8220;;expires=&#8221;</span> + expires_date.<span style="color:#0000ff;">toGMTString</span>() :<span style="color:#800000;"> &#8220;&#8221;</span> ) +<br />
( ( path ) ? <span style="color:#800000;">&#8220;;path=&#8221;</span> + path : <span style="color:#800000;">&#8220;&#8221; </span>) +<br />
( ( domain ) ?<span style="color:#800000;"> &#8220;;domain=&#8221;</span> + domain : <span style="color:#800000;">&#8220;&#8221;</span> ) +<br />
( ( secure ) ? <span style="color:#800000;">&#8220;;secure&#8221;</span> : <span style="color:#800000;">&#8220;&#8221;</span> );</p>
<p>}</p>
<p><span style="color:#800080;">Set_Cookie</span>(<span style="color:#800000;">&#8220;testname&#8221;</span>, <span style="color:#800000;">&#8220;testvalue&#8221;</span>, <span style="color:#ff0000;">1</span>, <span style="color:#800000;">&#8220;/&#8221;</span>, <span style="color:#800000;">&#8220;&#8221;</span>, <span style="color:#800000;">&#8220;&#8221;</span>);</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thebeanproject.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thebeanproject.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thebeanproject.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thebeanproject.wordpress.com&amp;blog=8238418&amp;post=12&amp;subd=thebeanproject&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thebeanproject.wordpress.com/2009/06/19/javascript-set-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4924d548e468928c42f141020d121d9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thebeanproject</media:title>
		</media:content>
	</item>
	</channel>
</rss>
