<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DAN FOLKES &#187; Code</title>
	<atom:link href="http://danfolkes.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://danfolkes.com</link>
	<description>programmers blog</description>
	<lastBuildDate>Wed, 08 May 2013 18:29:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Quick Weather App in Your URL</title>
		<link>http://danfolkes.com/2013/05/08/quick-weather-app-in-your-url/</link>
		<comments>http://danfolkes.com/2013/05/08/quick-weather-app-in-your-url/#comments</comments>
		<pubDate>Wed, 08 May 2013 17:03:16 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[data:html]]></category>
		<category><![CDATA[data:text]]></category>
		<category><![CDATA[data:text/html]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1677</guid>
		<description><![CDATA[I wanted to make a good little weather app for myself for Richmond, VA. I couldn&#8217;t find what I wanted, but I was able to write a little bookmarklet using Chrome and Firefox&#8217;s ability to have data:text urls. Here is the URL: LINK data:text/html,&#60;html&#62;&#60;head&#62;&#60;style&#62;body,img &#123;white-space:nowrap;float:left;&#125;&#60;/style&#62;&#60;/head&#62;&#60;body&#62;&#60;img src = &#34;http://forecast.weather.gov/wtf/meteograms/Plotter.php?lat=37.53819&#38;lon=-77.46955&#38;wfo=AKQ&#38;zcode=VAZ071&#38;gset=20&#38;gdiff=10&#38;unit=0&#38;tinfo=EY5&#38;ahour=0&#38;pcmd=101001100100000000000000000000000000000000000000000000000&#38;lg=en&#38;indu=1!1!1&#38;dd=0&#38;bw=0&#38;hrspan=48&#38;pqpfhr=6&#38;psnwhr=6&#34; /&#62;&#60;img src = &#34;http://forecast.weather.gov/wtf/meteograms/Plotter.php?lat=37.53819&#38;lon=-77.46955&#38;wfo=AKQ&#38;zcode=VAZ071&#38;gset=20&#38;gdiff=10&#38;unit=0&#38;tinfo=EY5&#38;ahour=48&#38;pcmd=101001100100000000000000000000000000000000000000000000000&#38;lg=en&#38;indu=1!1!1&#38;dd=0&#38;bw=0&#38;hrspan=48&#38;pqpfhr=6&#38;psnwhr=6&#34; /&#62;&#60;img src = [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>I wanted to make a good little weather app for myself for Richmond, VA.</p>
<p>I couldn&#8217;t find what I wanted, but I was able to write a little bookmarklet using Chrome and Firefox&#8217;s ability to have data:text urls.</p>
<p>Here is the URL:<br />
<a href='http://preview.tinyurl.com/bsava5x'>LINK</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">data:text<span style="color: #000000; font-weight: bold;">/</span>html,<span style="color: #000000; font-weight: bold;">&lt;</span>html<span style="color: #000000; font-weight: bold;">&gt;&lt;</span><span style="color: #c20cb9; font-weight: bold;">head</span><span style="color: #000000; font-weight: bold;">&gt;&lt;</span>style<span style="color: #000000; font-weight: bold;">&gt;</span>body,img <span style="color: #7a0874; font-weight: bold;">&#123;</span>white-space:nowrap;float:left;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">&lt;/</span>style<span style="color: #000000; font-weight: bold;">&gt;&lt;/</span><span style="color: #c20cb9; font-weight: bold;">head</span><span style="color: #000000; font-weight: bold;">&gt;&lt;</span>body<span style="color: #000000; font-weight: bold;">&gt;&lt;</span>img src = <span style="color: #ff0000;">&quot;http://forecast.weather.gov/wtf/meteograms/Plotter.php?lat=37.53819&amp;lon=-77.46955&amp;wfo=AKQ&amp;zcode=VAZ071&amp;gset=20&amp;gdiff=10&amp;unit=0&amp;tinfo=EY5&amp;ahour=0&amp;pcmd=101001100100000000000000000000000000000000000000000000000&amp;lg=en&amp;indu=1!1!1&amp;dd=0&amp;bw=0&amp;hrspan=48&amp;pqpfhr=6&amp;psnwhr=6&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;&lt;</span>img src = <span style="color: #ff0000;">&quot;http://forecast.weather.gov/wtf/meteograms/Plotter.php?lat=37.53819&amp;lon=-77.46955&amp;wfo=AKQ&amp;zcode=VAZ071&amp;gset=20&amp;gdiff=10&amp;unit=0&amp;tinfo=EY5&amp;ahour=48&amp;pcmd=101001100100000000000000000000000000000000000000000000000&amp;lg=en&amp;indu=1!1!1&amp;dd=0&amp;bw=0&amp;hrspan=48&amp;pqpfhr=6&amp;psnwhr=6&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;&lt;</span>img src = <span style="color: #ff0000;">&quot;http://forecast.weather.gov/wtf/meteograms/Plotter.php?lat=37.53819&amp;lon=-77.46955&amp;wfo=AKQ&amp;zcode=VAZ071&amp;gset=20&amp;gdiff=10&amp;unit=0&amp;tinfo=EY5&amp;ahour=96&amp;pcmd=101001100100000000000000000000000000000000000000000000000&amp;lg=en&amp;indu=1!1!1&amp;dd=0&amp;bw=0&amp;hrspan=48&amp;pqpfhr=6&amp;psnwhr=6&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;&lt;/</span>body<span style="color: #000000; font-weight: bold;">&gt;&lt;/</span>html<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p><span style="line-height: 1.714285714; font-size: 1rem;">Just put that in your URL and you will get a good Richmond Weather Graph.</span></p>
<p>The pictures are taken from:<br />
<a href="http://forecast.weather.gov/MapClick.php?lat=37.58036&amp;lon=-77.4874049&amp;unit=0&amp;lg=english&amp;FcstType=graphical">http://forecast.weather.gov/MapClick.php?lat=37.58036&amp;lon=-77.4874049&amp;unit=0&amp;lg=english&amp;FcstType=graphical</a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2013/05/08/quick-weather-app-in-your-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Large File Transfer &#8211; Samsung Galaxy S3 SGS</title>
		<link>http://danfolkes.com/2013/02/28/android-large-file-transfer-samsung-galaxy-s3-sgs/</link>
		<comments>http://danfolkes.com/2013/02/28/android-large-file-transfer-samsung-galaxy-s3-sgs/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 19:47:05 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1661</guid>
		<description><![CDATA[This is one way transfer large files to android when other methods do not work: Turn on Developer Mode and Debugging Tools Install Android SDK on your computer Plug in phone and open the command prompt and type: More ADB info PATH-TO\android-sdk-windows\platform-tools\adb.exe push PATH-TO\FILE.zip /mnt/sdcard/ This usually takes a second.  I would first try transferring a small [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2013/02/25/current-phone-setup-galaxy-s-iii-cyanogenmod/' rel='bookmark' title='Current Phone Setup &#8211; Galaxy S III &#8211; Cyanogenmod'>Current Phone Setup &#8211; Galaxy S III &#8211; Cyanogenmod</a></li>
<li><a href='http://danfolkes.com/2011/06/29/foxtophone-send-links-from-firefox-to-android-like-chrometophone/' rel='bookmark' title='FoxToPhone &#8211; Send Links from Firefox to Android &#8211; (Like ChromeToPhone)'>FoxToPhone &#8211; Send Links from Firefox to Android &#8211; (Like ChromeToPhone)</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This is one way transfer large files to android when other methods do not work:</p>
<ul>
<li>Turn on <a href="http://www.teamandroid.com/2012/11/02/how-to-enable-developer-options-in-android-42-jelly-bean/">Developer Mode and Debugging Tools</a></li>
<li><a href="http://developer.android.com/sdk/installing/index.html">Install Android SDK</a> on your computer</li>
<li>Plug in phone and open the command prompt and type:</li>
<li><span style="line-height: 1.714285714; font-size: 1rem;"><span style="line-height: 1.714285714; font-size: 1rem;"><a href="http://developer.android.com/tools/help/adb.html">More ADB info</a><br />
</span></span></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">PATH-TO\android-sdk-windows\platform-tools\adb.exe push PATH-TO\FILE.zip <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>sdcard<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>

</li>
<li><span style="font-size: 1rem; line-height: 1.714285714;">This usually takes a second.  I would first try </span>transferring<span style="font-size: 1rem; line-height: 1.714285714;"> a small file to make sure you have the correct path.</span></li>
</ul>
<blockquote style="margin-left: 40px; border: none; padding: 0px;"><p>Note: The &#8216;/mnt/sdcard&#8217; may be specific to my device.  If you can&#8217;t seem to find a writable folder do this:</p></blockquote>
<blockquote style="margin-left: 40px; border: none; padding: 0px;">

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">PATH-TO\android-sdk-windows\platform-tools\adb.exe shell</pre></td></tr></table></div>

</blockquote>
<blockquote style="margin-left: 40px; border: none; padding: 0px;"><p>then, using <strong>ls</strong> and <strong>cd</strong> commands, you can move around and try and find the path to your writable directory.</p></blockquote>
<p>&nbsp;</p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">Hope this helps someone!</span></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2013/02/25/current-phone-setup-galaxy-s-iii-cyanogenmod/' rel='bookmark' title='Current Phone Setup &#8211; Galaxy S III &#8211; Cyanogenmod'>Current Phone Setup &#8211; Galaxy S III &#8211; Cyanogenmod</a></li>
<li><a href='http://danfolkes.com/2011/06/29/foxtophone-send-links-from-firefox-to-android-like-chrometophone/' rel='bookmark' title='FoxToPhone &#8211; Send Links from Firefox to Android &#8211; (Like ChromeToPhone)'>FoxToPhone &#8211; Send Links from Firefox to Android &#8211; (Like ChromeToPhone)</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2013/02/28/android-large-file-transfer-samsung-galaxy-s3-sgs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teaching Kids to Code &#8211; Processing.org</title>
		<link>http://danfolkes.com/2013/02/27/teaching-kids-to-code-processing-org/</link>
		<comments>http://danfolkes.com/2013/02/27/teaching-kids-to-code-processing-org/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 18:21:20 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1649</guid>
		<description><![CDATA[My friend Eric is a technology teacher at a school in the Richmond area and I were discussing the importance of teaching kids to code.  The website code.org goes into it. I thought I should write up a quick tutorial on ways for kids (or grown ups) to code while: Having fun Creating Learning Sharing their [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
<li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>My friend Eric is a technology teacher at a school in the Richmond area and I were discussing the importance of teaching kids to code.  The website code.org goes into it.</p>
<p>I thought I should write up a quick tutorial on ways for kids (or grown ups) to code while:</p>
<ul>
<li>Having fun</li>
<li>Creating</li>
<li>Learning</li>
<li>Sharing their work</li>
<li>Building off of each others work</li>
</ul>
<p>My tutorial utilizes two technologies:</p>
<p><strong><a title="http://jsfiddle.net/" href="http://jsfiddle.net/" target="_blank">jsfiddle</a> : </strong>This web platform allows you to program in javascript and see your results.  You can share and build off existing code.</p>
<p><strong><a title="http://processingjs.org/" href="http://processingjs.org/" target="_blank">Processingjs.org</a> : </strong>This javascript library allows you to cool stuff like: <a href="http://haptic-data.com/toxiclibsjs/examples/Circle3Points_pjs.html" target="_blank">this</a>, <a href="http://haptic-data.com/toxiclibsjs/examples/DraggableParticles_pjs.html" target="_blank">this</a>, or <a href="http://balldroppings.com/js/" target="_blank">this</a>.  It is a powerful library that has great <a href="http://processingjs.org/reference/" target="_blank">documentation</a>.</p>
<p>So, here are my basic first instructions:</p>
<div></div>
<div><strong>START:</strong></div>
<div>Go here: <a href="http://jsfiddle.net/n2yUg/21/" target="_blank">http://jsfiddle.net/n2yUg/21/</a></div>
<div></div>
<div><strong style="font-size: 1rem; line-height: 1;"><br />
EDITING:</strong></div>
<div>So, in this example, you can change the line of code:</div>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">processing.<span style="color: #660066;">background</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">224</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div></div>
<div>to be:</div>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">processing.<span style="color: #660066;">background</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">255</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div></div>
<div><strong style="font-size: 1rem; line-height: 1;"><br />
VIEWING:</strong></div>
<div>Hit RUN, and you will get a red background.</div>
<div>(<a href="http://processing.org/reference/background_.html" target="_blank">background function documentation</a>)</div>
<div></div>
<div><strong style="font-size: 1rem; line-height: 1;"><br />
SHARING:</strong></div>
<div>Then, you can use the SHARE button and you can see options to use Twitter or just send a link without any code:</div>
<div><a href="http://jsfiddle.net/n2yUg/22/embedded/result/" target="_blank">http://jsfiddle.net/n2yUg/22/embedded/result/</a></div>
<p>&nbsp;</p>
<p>So, I think you could learn a whole lot from these two things combined.</p>
<p>Hope this helps!</p>
<p>&nbsp;</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
<li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2013/02/27/teaching-kids-to-code-processing-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MailChimp &#8211; Pass Email to Form</title>
		<link>http://danfolkes.com/2013/02/26/mailchimp-pass-email-to-form/</link>
		<comments>http://danfolkes.com/2013/02/26/mailchimp-pass-email-to-form/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 16:37:23 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1641</guid>
		<description><![CDATA[I wanted to use a basic email field and send the information to a mailchimp form.  I could not find the solution anywhere, so I decided to see if I could hack a solution. When you go to MailChimp &#62; For Your Website &#62; Signup Form Link Code You will get something like: http://eepurl.com/XXXX, which will [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2013/02/mclogowhitebg.jpeg" alt="mail chimp logo" title="mail chimp logo" width="900" height="305" class="alignnone size-full wp-image-1643" /></p>
<p>I wanted to use a basic email field and send the information to a mailchimp form.  I could not find the solution anywhere, so I decided to see if I could hack a solution.</p>
<p>When you go to MailChimp &gt; For Your Website &gt; Signup Form Link Code<br />
You will get something like: http://eepurl.com/XXXX, which will take you to something like:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">http://toolstoday.us2.list-manage.com/subscribe?u=XXXXXXXXXXX&amp;amp;id=XXXXXXXXXXX</pre></td></tr></table></div>

<p>If you look at the source on this page, you will see that the form elements are called: MERGE0, MERGE1&#8230;</p>
<p>On my form, the email field is MERGE0, so on my website, I was able to create a javascript link that will automatically fill in email by using this link:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">http://XXXXXXXXXXX.us2.list-manage.com/subscribe?u=XXXXXXXXXXX&amp;amp;id=XXXXXXXXXXX&amp;amp;MERGE0=example@email.com</pre></td></tr></table></div>

<p>You can fill in more than one field by adding more merge fields in the url:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">http://XXXXXXXXXXX.us2.list-manage.com/subscribe?u=XXXXXXXXXXX&amp;amp;id=XXXXXXXXXXX&amp;amp;MERGE0=example@email.com;MERGE1=Daniel Folkes</pre></td></tr></table></div>

<p>Then, you can use this jquery to auto open a new window on enter key press:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#ea&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keypress</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">which</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">13</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #006600; font-style: italic;">//dan@dans</span>
                    <span style="color: #000066; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;//XXXXXXXXXXX.us2.list-manage.com/subscribe?u=XXXXXXXXXXX&amp;id=XXXXXXXXXXX&quot;</span><span style="color: #339933;">;</span>
                    url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;MERGE0=&quot;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#ea&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// ea is my email input text box.</span>
                    window.<span style="color: #660066;">open</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;mywindow&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;status=1,toolbar=1,resizable=1,width=1000,height=600&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
             <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2013/02/26/mailchimp-pass-email-to-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moderating Comments on a Freehostia Chocolate Account (Free)</title>
		<link>http://danfolkes.com/2013/02/13/moderating-comments-on-a-freehostia-chocolate-account-free/</link>
		<comments>http://danfolkes.com/2013/02/13/moderating-comments-on-a-freehostia-chocolate-account-free/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 19:08:35 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[a connection to akismet.com can not be established at this time]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Akismet]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[connections]]></category>
		<category><![CDATA[Disqus]]></category>
		<category><![CDATA[Freehostia]]></category>
		<category><![CDATA[Freehostia Free]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[manually]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[Unable to reach any Akismet servers.]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1622</guid>
		<description><![CDATA[The problem: Freehostia Free Accounts block outside connections.  This means that Akismet can&#8217;t access it&#8217;s servers and you can&#8217;t have spam checking.  So, all of your comments are spam spam spam! I tried to add a captcha, but they got around that.  I tried to add Disqus using the plugin, but that failed to install [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>The problem: Freehostia Free Accounts block outside connections.  This means that Akismet can&#8217;t access it&#8217;s servers and you can&#8217;t have spam checking.  So, all of your comments are spam spam spam!</p>
<p>I tried to add a captcha, but they got around that.  I tried to add Disqus using the plugin, but that failed to install because of the account&#8217;s limitations.</p>
<p>But, I was able to add moderated comments to my freehostia site by manually installing Disqus.  This is very necessary because otherwise you get hit with a bunch of spammers.</p>
<p>Here is how you manually install Disqus on WordPress.</p>
<ol>
<li>Create <a href="https://disqus.com/admin/signup/">New Disqus Account </a></li>
<li>Go to your <a href="http://disqus.com/dashboard/">dashboard</a></li>
<li>Click on your site</li>
<li>Go to <strong>Settings</strong></li>
<li>And then click <strong>Install</strong></li>
<li>Select <strong>Universal Code</strong></li>
<li>Copy that code</li>
<li>In /wp-content/themes/THEMENAME/single.php Replace:

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_template<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>with:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'	
&nbsp;
YOUR COPIED CODE HERE.  
&nbsp;
    But you must remember to ESCAPE the 
    single quotes with backslashes example: \'
&nbsp;
	'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

</li>
<li>Save, Upload, then go to one of your posts. You should see Disqus loading at the bottom.</li>
<li>Remember to setup your Disqus the way you want it.  It&#8217;s a little restrictive out of the box. You can even add Akismet to Disqus in their admin interface. </li>
</ol>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2013/02/13/moderating-comments-on-a-freehostia-chocolate-account-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short Domain Name Finder</title>
		<link>http://danfolkes.com/2012/10/12/short-domain-name-finder/</link>
		<comments>http://danfolkes.com/2012/10/12/short-domain-name-finder/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 16:22:35 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[domain name]]></category>
		<category><![CDATA[domainr]]></category>
		<category><![CDATA[find short domain name]]></category>
		<category><![CDATA[find small urls]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[short domain]]></category>
		<category><![CDATA[short domain name]]></category>
		<category><![CDATA[small]]></category>
		<category><![CDATA[tiny]]></category>
		<category><![CDATA[tiny url]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1526</guid>
		<description><![CDATA[This is a short url finder I created. It checks to see if the domain is available remembers. Short Domain Name Finder There is a python script in the background that populates a mysql database which displays it with php.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/' rel='bookmark' title='IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line'>IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This is a short url finder I created.<br />
It checks to see if the domain is available remembers.</p>
<p><a href='https://danfolkes.com/short-domain-names/'>Short Domain Name Finder</a></p>
<p>There is a python script in the background that populates a mysql database which displays it with php. </p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/' rel='bookmark' title='IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line'>IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/10/12/short-domain-name-finder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Diaspora on Ubuntu on VirtualBox</title>
		<link>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/</link>
		<comments>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 20:12:13 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[/script/server]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Box]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[ca_file]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[Diaspora]]></category>
		<category><![CDATA[diaspora.git]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pod]]></category>
		<category><![CDATA[proxy proxy_balancer]]></category>
		<category><![CDATA[proxy_http]]></category>
		<category><![CDATA[rails_env]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[rvm install]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script server]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSLCertificateFile]]></category>
		<category><![CDATA[SSLCertificateKeyFile]]></category>
		<category><![CDATA[thin]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vdi]]></category>
		<category><![CDATA[Virtual]]></category>
		<category><![CDATA[Virtual Box]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VirtualHost]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1523</guid>
		<description><![CDATA[Installing Diaspora on Ubuntu on VirtualBox I wrote up a little howto on the Diaspora git hub: https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
<li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Installing Diaspora on Ubuntu on VirtualBox</p>
<p>I wrote up a little howto on the Diaspora git hub:<br />
<a href="https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox">https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox</a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
<li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</title>
		<link>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/</link>
		<comments>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/#comments</comments>
		<pubDate>Tue, 01 May 2012 16:40:42 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1519</guid>
		<description><![CDATA[First Install Pear, Mail, Mail Mime, Net SMTP. Restart Apache: sudo apt-get install php-pear sudo pear install mail sudo pear install mail_mime sudo pear install Net_SMTP sudo /etc/init.d/apache2 restart Here is the PHP code I used to send an email: try &#123; require_once &#34;Mail.php&#34;; &#160; $from = &#34;from@example.com&#34;; $to = &#34;{$email}&#34;; $subject = &#34;Hi!&#34;; $body [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>First Install Pear, Mail, Mail Mime, Net SMTP.  Restart Apache:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> php-pear
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> mail
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> mail_mime
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> Net_SMTP
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></td></tr></table></div>

<p>Here is the PHP code I used to send an email:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">try <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Mail.php&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;from@example.com&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$email}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hi!&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hi,<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>How are you?&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ssl://smtp.gmail.com&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$port</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;465&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;USERNAME@gmail.com&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//This can also be a Google Apps account</span>
	<span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;PASSWORD&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'From'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$from</span><span style="color: #339933;">,</span>
	  <span style="color: #0000ff;">'To'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$to</span><span style="color: #339933;">,</span>
	  <span style="color: #0000ff;">'Subject'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$smtp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">Mail</span><span style="color: #339933;">::</span><span style="color: #004000;">factory</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smtp'</span><span style="color: #339933;">,</span>
	  <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$host</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$port</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'auth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$mail</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #339933;">,</span> <span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>PEAR<span style="color: #339933;">::</span><span style="color: #004000;">isError</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mail</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;p&gt;Message successfully sent!&lt;/p&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Caught exception: '</span><span style="color: #339933;">,</span>  <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</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: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting a Magnet Link into a Torrent</title>
		<link>http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/</link>
		<comments>http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 14:57:20 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[add_magnet_uri]]></category>
		<category><![CDATA[apt-get install python-libtorrent]]></category>
		<category><![CDATA[bt]]></category>
		<category><![CDATA[convert magnet]]></category>
		<category><![CDATA[create torrent]]></category>
		<category><![CDATA[create_torrent]]></category>
		<category><![CDATA[file_storage]]></category>
		<category><![CDATA[get_torrent_info]]></category>
		<category><![CDATA[import libtorrent as lt]]></category>
		<category><![CDATA[install libtorrent-python]]></category>
		<category><![CDATA[install python-libtorrent]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[libtorrent]]></category>
		<category><![CDATA[libtorrent-python]]></category>
		<category><![CDATA[magnet]]></category>
		<category><![CDATA[magnet link]]></category>
		<category><![CDATA[Magnet2Torrent]]></category>
		<category><![CDATA[Magnet2Torrent.py]]></category>
		<category><![CDATA[magnetlink]]></category>
		<category><![CDATA[pirate bay]]></category>
		<category><![CDATA[python-libtorrent]]></category>
		<category><![CDATA[rtorrent]]></category>
		<category><![CDATA[start_dht]]></category>
		<category><![CDATA[sudo apt-get install python-libtorrent]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1501</guid>
		<description><![CDATA[UPDATE &#8211; 2012-04-30 &#8211; User Faless on GitHub has added a good bit of functionality. Check it out. &#8211; For some reason, my version of the rtorrent client on ubuntu does not open magnet files. So, I wanted to see if there was a way to create torrent files from magnet files. I couldn&#8217;t find [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE &#8211; 2012-04-30 &#8211; </strong> User <a href="https://github.com/Faless">Faless</a> on GitHub has added a good bit of functionality. <a href="https://github.com/danfolkes/Magnet2Torrent">Check it out</a>.<br />
&#8211;</p>
<p>For some reason, my version of the rtorrent client on ubuntu does not open magnet files.  So, I wanted to see if there was a way to create torrent files from magnet files.  I couldn&#8217;t find a good example, so I wrote my own.</p>
<p><strong>This will convert a magnet link into a .torrent file:</strong></p>
<p>First, make sure your system has Python and the Python Library:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> python-libtorrent</pre></td></tr></table></div>

<p>Then, you can run the following code by calling this command:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">python Magnet2Torrent.py</pre></td></tr></table></div>

<p>File Magnet2Torrent.py:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #483d8b;">'''
Created on Apr 19, 2012
@author: dan
'''</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ <span style="color: #66cc66;">==</span> <span style="color: #483d8b;">'__main__'</span>:
    <span style="color: #ff7700;font-weight:bold;">import</span> libtorrent <span style="color: #ff7700;font-weight:bold;">as</span> lt
    <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
&nbsp;
    TorrentFilePath <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;/home/dan/torrentfiles/&quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;/&quot;</span>
    TorrentFilePath2 <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;/home/dan/torrentfiles/&quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;/&quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;.torrent&quot;</span>
    ses <span style="color: #66cc66;">=</span> lt.<span style="color: black;">session</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;">#ses.listen_on(6881, 6891)</span>
    params <span style="color: #66cc66;">=</span> <span style="color: black;">&#123;</span>
        <span style="color: #483d8b;">'save_path'</span>: TorrentFilePath<span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'duplicate_is_error'</span>: <span style="color: #008000;">True</span><span style="color: black;">&#125;</span>
    link <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;magnet:?xt=urn:btih:599e3fb0433505f27d35efbe398225869a2a89a9&amp;dn=ubuntu-10.04.4-server-i386.iso&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&amp;tr=udp%3A%2F%2Ftracker.ccc.de%3A80&quot;</span>
    handle <span style="color: #66cc66;">=</span> lt.<span style="color: black;">add_magnet_uri</span><span style="color: black;">&#40;</span>ses<span style="color: #66cc66;">,</span> link<span style="color: #66cc66;">,</span> params<span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;">#    ses.start_dht()</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'saving torrent file here : '</span> + TorrentFilePath2 + <span style="color: #483d8b;">&quot; ...&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">not</span> handle.<span style="color: black;">has_metadata</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
        <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">.1</span><span style="color: black;">&#41;</span>
&nbsp;
    torinfo <span style="color: #66cc66;">=</span> handle.<span style="color: black;">get_torrent_info</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    fs <span style="color: #66cc66;">=</span> lt.<span style="color: black;">file_storage</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #008000;">file</span> <span style="color: #ff7700;font-weight:bold;">in</span> torinfo.<span style="color: black;">files</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        fs.<span style="color: black;">add_file</span><span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span>
    torfile <span style="color: #66cc66;">=</span> lt.<span style="color: black;">create_torrent</span><span style="color: black;">&#40;</span>fs<span style="color: black;">&#41;</span>
    torfile.<span style="color: black;">set_comment</span><span style="color: black;">&#40;</span>torinfo.<span style="color: black;">comment</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    torfile.<span style="color: black;">set_creator</span><span style="color: black;">&#40;</span>torinfo.<span style="color: black;">creator</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    f <span style="color: #66cc66;">=</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>TorrentFilePath2 + <span style="color: #483d8b;">&quot;torrentfile.torrent&quot;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;wb&quot;</span><span style="color: black;">&#41;</span>
    f.<span style="color: black;">write</span><span style="color: black;">&#40;</span>lt.<span style="color: black;">bencode</span><span style="color: black;">&#40;</span>torfile.<span style="color: black;">generate</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'saved and closing...'</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#Uncomment to Download the Torrent:</span>
<span style="color: #808080; font-style: italic;">#    print 'starting torrent download...'</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#    while (handle.status().state != lt.torrent_status.seeding):</span>
<span style="color: #808080; font-style: italic;">#        s = handle.status()</span>
<span style="color: #808080; font-style: italic;">#        time.sleep(55)</span>
<span style="color: #808080; font-style: italic;">#        print 'downloading...'</span></pre></td></tr></table></div>

<p>This will create a folder inside of &#8216;/home/dan/torrentfiles/&#8217; with a structure like:</p>
<pre lang='bash'>/home/dan/torrentfiles/545465456.12/545465456.12.torrent
<pre>
<p>I added this to GitHub if you want to Fork it.<br />
<a href="https://github.com/danfolkes/Magnet2Torrent">https://github.com/danfolkes/Magnet2Torrent</a></p>
<p>ENJOY!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Remove All Facebook Friends &#8211; Script</title>
		<link>http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/</link>
		<comments>http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 14:57:47 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[delete all of my friends]]></category>
		<category><![CDATA[delete all of your friends]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook friends]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Remove All]]></category>
		<category><![CDATA[Remove All Facebook Friends]]></category>
		<category><![CDATA[Remove All Friends]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Selenium IDE]]></category>
		<category><![CDATA[unfriend friends]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1489</guid>
		<description><![CDATA[I made a script that will allow you to automatically remove all your Facebook friends at once. Here is what you are going to need: Firefox Selenium IDE (under Selenium IDE paragraph) You will have to restart Firefox after the plugin installs. Script File: Facebook &#8211; Remove All Friends Script for Selenium IDE.txt 1. Open [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2009/02/16/hamachi-install-for-starcraft/' rel='bookmark' title='Hamachi Install for Starcraft'>Hamachi Install for Starcraft</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>I made a script that will allow you to automatically remove all your Facebook friends at once.</p>
<p><strong>Here is what you are going to need:</strong></p>
<ul>
<li>Firefox</li>
<li><a href="http://seleniumhq.org/download/">Selenium IDE</a> (under Selenium IDE paragraph)</li>
<li>You will have to restart Firefox after the plugin installs.</li>
<li>Script File: <a href='http://danfolkes.com/wp-content/uploads/2012/03/Facebook-Remove-All-Friends-Script-for-Selenium-IDE.txt'>Facebook &#8211; Remove All Friends Script for Selenium IDE.txt</a></li>
</ul>
<p><strong>1. Open Firefox, Open Facebook and login!</strong></p>
<p><strong>2. Now, you must open the IDE</strong> by going: Firefox > Developer Tools > Selenium IDE (Ctrl + Alt + S on some computers)<br />
<img src="http://danfolkes.com/wp-content/uploads/2012/03/Open-Selenium-IDE-in-Firefox.jpg" alt="" title="Open-Selenium-IDE-in-Firefox" width="414" height="453" class="alignnone size-full wp-image-1494" /></p>
<p><strong>3. Load Script File :</strong><br />
In Selenium IDE, do a File > Open > [Select the script file from above]<br />
OK, the script is loaded and should look like this:<br />
<img src="http://danfolkes.com/wp-content/uploads/2012/03/Remove-All-Friends-From-Facebook.jpg" alt="" title="Remove-All-Friends-From-Facebook" width="528" height="423" class="alignnone size-full wp-image-1493" /></p>
<p><strong>4. Test the script</strong> before you start by clicking on the individual items and watching what Firefox does.  Start by clicking on the first few in order.  (open /friends/,click css=&#8230; , click=&#8230;Report,)</p>
<p><strong>5. If all that seems good, then run the test</strong> by doing : Actions > Play Current Test Case.</p>
<p><strong>6. Now you wait. Go get some coffee. </strong>You should now see your browser doing a bunch of automated things and wave goodbye to all your precious friends.</p>
<p><strong>Tips:</strong></p>
<ul>
<li>You can easily modify the script by looking through the <a href="http://seleniumhq.org/docs/">documentation</a>.</li>
<li>You can easily lengthen the script by going clicking on the [Source] tab and copy and pasting from OPEN friends to click OK</li>
<li>Or, you can add <a href="http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html">flow control/loops</a></li>
<li>You can ask questions here: <a href="http://stackoverflow.com/questions/tagged/selenium">http://stackoverflow.com/questions/tagged/selenium</a></li>
<li>A warning message will not be sent to your friends, so feel free to delete as many friends as you want.</li>
</ul>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2009/02/16/hamachi-install-for-starcraft/' rel='bookmark' title='Hamachi Install for Starcraft'>Hamachi Install for Starcraft</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</title>
		<link>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/</link>
		<comments>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:57:31 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[?callback]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[available]]></category>
		<category><![CDATA[callbackName]]></category>
		<category><![CDATA[cross site]]></category>
		<category><![CDATA[cross site script]]></category>
		<category><![CDATA[dataType]]></category>
		<category><![CDATA[dataType: jsonp]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[External]]></category>
		<category><![CDATA[External Domain]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery.ajax]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[JSONP]]></category>
		<category><![CDATA[jsonpCallback]]></category>
		<category><![CDATA[onJSONPLoad]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[Webservice]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1482</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain. This allows [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/">PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX</a></p>
<p>OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain.  This allows your webservice to be available too whoever wants to call it.</p>
<p>Here is the PHP Code: (Not all of it, but enough to get the idea)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//http://SERVER_domain.com/webservice.php</span>
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GetTriviaTag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">triviaid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'triviaid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tagid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tagid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM trivia_tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTriviaTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$where</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; (1 = 1)&quot;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// THIS WILL SELECT ALL</span>
<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//OUTPUT JSON:</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'callback'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// &lt;-- THIS IS IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And now, to access it from javascript in an external domain (non &#8211; SERVER_domain.com ):</p>
<p>http://CLIENT_domain.com/Test.html:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Test<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://code.jquery.com/jquery-latest.js&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
	<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;triviaQuestions&quot;</span><span style="color: #339933;">&gt;</span> loading<span style="color: #339933;">...</span> <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// THE 'callback=?' in this request is IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
				$<span style="color: #339933;">.</span>getJSON<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://SERVER_domain.com/webservice.php&amp;callback=?'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					$<span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">key</span><span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						htmlResult <span style="color: #339933;">+=</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;Q: &quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>id <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>question <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#triviaQuestions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>html<span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
	<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</title>
		<link>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/</link>
		<comments>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 15:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[application/json]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Content-type]]></category>
		<category><![CDATA[Content-type: application/json]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[Request]]></category>
		<category><![CDATA[Response]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1470</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a Web Service using JSONP from External Domain – PHP – JQuery The HTML that calls the Javascript: &#60;div id=&#34;taglist&#34;&#62;&#60;/div&#62; &#60;input name=&#34;searchTags&#34; id=&#34;searchTags&#34; type=&#34;text&#34; /&#62; &#60;input type=&#34;button&#34; name=&#34;searchtags&#34; onclick=&#34;getTags()&#34; value=&#34;search&#34;/&#62; &#60;div id=&#34;tagresult&#34;&#62; &#60;/div&#62; The JavaScript (JQuery) AJAX Request and Response Processing: function getTags&#40;&#41; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/">Web Service using JSONP from External Domain – PHP – JQuery</a></p>
<p>The HTML that calls the Javascript:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;taglist&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchtags&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;getTags()&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;search&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagresult&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p><strong>The JavaScript </strong>(JQuery) AJAX Request and Response Processing:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">function</span> getTags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#searchTags'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ws.php?type=tag&amp;wN=name&amp;wO=like&amp;wV='</span> <span style="color: #339933;">+</span> q<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
			$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>key<span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">//As you can see, you can access the JSON (at the bottom of the page) by doing val.PROPERTYNAME:</span>
				htmlResult <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;br /&gt;Add : &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>#<span style="color: #000099; font-weight: bold;">\&quot;</span> onclick=<span style="color: #000099; font-weight: bold;">\&quot;</span>addTag(&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">id</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'); return false;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tagresult'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>PHP Code</strong> that returns JSON in the PHP file called by the AJAX: (ws.php)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$ta</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TagAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ta</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTagsWhere</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; <span style="color: #006699; font-weight: bold;">{$whereName}</span> LIKE '%<span style="color: #006699; font-weight: bold;">{$whereVariable}</span>%'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span>  <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The GetTagsWhere Helper Function:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetTagsWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
    	<span style="color: #666666; font-style: italic;">// THE PDO Object was created previously</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>JSON</strong> Returned:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;4&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;NON-FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; NON-FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</title>
		<link>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/</link>
		<comments>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 19:38:47 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[end Request]]></category>
		<category><![CDATA[endRequest]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Page Request Manager]]></category>
		<category><![CDATA[PageRequest Manager]]></category>
		<category><![CDATA[PageRequestManager]]></category>
		<category><![CDATA[Request]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1437</guid>
		<description><![CDATA[I needed to add a onclick event to a textbox in asp.net to change it to remove text from a textbox onClick when it is clicked. The normal code would look something like this: 1 &#60;asp:TextBox ID=&#34;txtStoreLocatorZip&#34; ValidationGroup=&#34;CustomerServiceEmail&#34; runat=&#34;server&#34; Text=&#34;Enter Zip&#34; CssClass=&#34;txtStoreLocatorZip_CssClass&#34; /&#62; 1 2 3 4 5 6 7 8 9 &#60;script&#62; if &#40;$&#40;'.txtStoreLocatorZip_CssClass'&#41;.val&#40;&#41; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>I needed to add a onclick event to a textbox in asp.net to change it to remove text from a textbox onClick when it is clicked.<br />
The normal code would look something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>TextBox  ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip&quot;</span> ValidationGroup<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CustomerServiceEmail&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Enter Zip&quot;</span> CssClass<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip_CssClass&quot;</span> <span style="color: #006600; font-weight: bold;">/&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>But, this won&#8217;t quite work because my textbox is in a UpdatePanel&#8217;s ContentTemplate and the javascript is not read on postback.</p>
<p>So, This is what I ended up doing (a simplified version):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UpdatePanel2&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> UpdateMode<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Conditional&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
	<span style="color: #006600; font-weight: bold;">&lt;</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
		<span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>TextBox  ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip&quot;</span> ValidationGroup<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CustomerServiceEmail&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Enter Zip&quot;</span> CssClass<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip_CssClass&quot;</span> <span style="color: #006600; font-weight: bold;">/&gt;</span>
	<span style="color: #006600; font-weight: bold;">&lt;/</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
	Sys.<span style="color: #660066;">WebForms</span>.<span style="color: #660066;">PageRequestManager</span>.<span style="color: #660066;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">add_endRequest</span><span style="color: #009900;">&#40;</span>endRequestHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">function</span> endRequestHandler<span style="color: #009900;">&#40;</span>sender<span style="color: #339933;">,</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>This will add an endRequest handler to the end of the partial page postback so that you can call a nice little function at the end of it.</p>
<p>Hope this helps some people!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.Net &#8211; Adding Parameters to CommandType.Text</title>
		<link>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/</link>
		<comments>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 21:35:05 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AddWithValue]]></category>
		<category><![CDATA[CommandType.Text]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Parameters.AddWithValue]]></category>
		<category><![CDATA[SELECT]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[where]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1411</guid>
		<description><![CDATA[This is how you add parameters to a standard CommandType.Text SQL call. This should prevent sql injection attacks. Using conSQL = New SqlConnection(&#34;CONNECTION STRING TO DATABASE&#34;) Try str = &#34;SELECT * FROM TableName where customerid = @CustomerID and CartType = @CartType&#34; cmdSQL = New SqlCommand(str, conSQL) cmdSQL.CommandType = CommandType.Text cmdSQL.Parameters.AddWithValue(&#34;@CustomerID&#34;, CustomerID) cmdSQL.Parameters.AddWithValue(&#34;@CartType&#34;, cartType) cartcount = [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/' rel='bookmark' title='Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL'>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</a></li>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/' rel='bookmark' title='ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages'>ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This is how you add parameters to a standard CommandType.Text SQL call.</p>
<p>This should prevent sql injection attacks.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">        Using conSQL = <span style="color: #E56717; font-weight: bold;">New</span> SqlConnection(<span style="color: #800000;">&quot;CONNECTION STRING TO DATABASE&quot;</span>)
            Try
                str = <span style="color: #800000;">&quot;SELECT * FROM TableName where customerid = @CustomerID and CartType = @CartType&quot;</span>
                cmdSQL = <span style="color: #E56717; font-weight: bold;">New</span> SqlCommand(str, conSQL)
                cmdSQL.CommandType = CommandType.Text
                cmdSQL.Parameters.AddWithValue(<span style="color: #800000;">&quot;@CustomerID&quot;</span>, CustomerID)
                cmdSQL.Parameters.AddWithValue(<span style="color: #800000;">&quot;@CartType&quot;</span>, cartType)
                cartcount = cmdSQL.ExecuteScalar()
            Catch ex <span style="color: #151B8D; font-weight: bold;">As</span> Exception
                cartcount = 0
            <span style="color: #8D38C9; font-weight: bold;">End</span> Try
        <span style="color: #8D38C9; font-weight: bold;">End</span> Using</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/' rel='bookmark' title='Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL'>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</a></li>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/' rel='bookmark' title='ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages'>ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp DropDownList &#8211; States &#8211; ListItem Example</title>
		<link>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/</link>
		<comments>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:18:17 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AL]]></category>
		<category><![CDATA[Alabama]]></category>
		<category><![CDATA[Asp]]></category>
		<category><![CDATA[asp:DropDownList]]></category>
		<category><![CDATA[asp:ListItem]]></category>
		<category><![CDATA[Drop Down List]]></category>
		<category><![CDATA[DropDown]]></category>
		<category><![CDATA[DropDownList]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[Item]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[List Item]]></category>
		<category><![CDATA[ListItem]]></category>
		<category><![CDATA[States]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[US States]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1392</guid>
		<description><![CDATA[Compiled List of US State Drop Downs for Asp.Net Forms: Hope this helps! &#60;asp:DropDownList ID=&#34;ddlState&#34; runat=&#34;server&#34;&#62; &#60;asp:ListItem Value=&#34;&#34; Selected=&#34;True&#34;&#62;Select a State&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AL&#34;&#62;Alabama&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AK&#34;&#62;Alaska&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AZ&#34;&#62;Arizona&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AR&#34;&#62;Arkansas&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CA&#34;&#62;California&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CO&#34;&#62;Colorado&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CT&#34;&#62;Connecticut&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;DC&#34;&#62;D.C.&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;DE&#34;&#62;Delaware&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;FL&#34;&#62;Florida&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;GA&#34;&#62;Georgia&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;HI&#34;&#62;Hawaii&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;ID&#34;&#62;Idaho&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IL&#34;&#62;Illinois&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IN&#34;&#62;Indiana&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IA&#34;&#62;Iowa&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;KS&#34;&#62;Kansas&#60;/asp:ListItem&#62; [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/08/Asp-DropDownList-States-ListItem-Example.jpg" alt="Asp DropDownList - States - ListItem Example" title="Asp DropDownList - States - ListItem Example" width="355" height="377" class="alignnone size-full wp-image-1397" /><br />
<strong>Compiled List of US State Drop Downs for Asp.Net Forms:</strong></p>
<p>Hope this helps!</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #990099; font-weight: bold;">Select</span> a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Alabama<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Alaska<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Arizona<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Arkansas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>California<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Colorado<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Connecticut<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>D.<span style="color: #9900cc;">C</span>.<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Delaware<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Florida<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Georgia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Hawaii<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Idaho<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Illinois<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Indiana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Iowa<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Kansas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Kentucky<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Louisiana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Maine<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Maryland<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Massachusetts<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Michigan<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Minnesota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Mississippi<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Missouri<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Montana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Nebraska<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Nevada<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #0000ff; font-weight: bold;">New</span> Hampshire<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #0000ff; font-weight: bold;">New</span> Jersey<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #0000ff; font-weight: bold;">New</span> Mexico<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #0000ff; font-weight: bold;">New</span> York<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>North Carolina<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>North Dakota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Ohio<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Oklahoma<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Oregon<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Pennsylvania<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Rhode Island<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>South Carolina<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>South Dakota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Tennessee<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Texas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Utah<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Vermont<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Virginia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Washington<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>West Virginia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Wisconsin<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Wyoming<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>More State Drop Downs After the fold:<br />
<span id="more-1392"></span><br />
<strong>Using the Text Property:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #990099; font-weight: bold;">Select</span> a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p><strong>Using the Text Property Reversed:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #990099; font-weight: bold;">Select</span> a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p><strong>States with just Long Names:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p><strong>States with just Short Names:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</title>
		<link>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/</link>
		<comments>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:56:59 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[CommandName]]></category>
		<category><![CDATA[ConnectionString]]></category>
		<category><![CDATA[DataBind]]></category>
		<category><![CDATA[dataItem.DataItemIndex]]></category>
		<category><![CDATA[DataKeys]]></category>
		<category><![CDATA[e.CommandName]]></category>
		<category><![CDATA[e.Item]]></category>
		<category><![CDATA[e.Item.FindControl]]></category>
		<category><![CDATA[e.Item.ItemType]]></category>
		<category><![CDATA[FindControl]]></category>
		<category><![CDATA[ItemCommand]]></category>
		<category><![CDATA[ItemDataBound]]></category>
		<category><![CDATA[Listview]]></category>
		<category><![CDATA[ListViewItemEventArgs]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Parameters.Add]]></category>
		<category><![CDATA[SelectCommand]]></category>
		<category><![CDATA[SelectParameters]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SqlDataSource]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[WebControls]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1384</guid>
		<description><![CDATA[Here is a basic Listview that has an ItemCommand and ItemDataBound: Frontend Code: &#60;asp:ListView ID=&#34;lvAddresses&#34; runat=&#34;server&#34; DataKeyNames=&#34;AddressID,BillingAddressID,ShippingAddressID&#34;&#62; &#60;LayoutTemplate&#62; &#60;asp:PlaceHolder ID=&#34;itemPlaceholder&#34; runat=&#34;server&#34;&#62;&#60;/asp:PlaceHolder&#62; &#60;/LayoutTemplate&#62; &#60;ItemTemplate&#62; &#60;table class=&#34;noborder address_book&#34; cellpadding=&#34;0&#34; cellspacing=&#34;0&#34;&#62;&#60;tbody&#62; &#60;tr&#62; &#60;td colspan=&#34;2&#34;&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;FirstName&#34;)%&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;LastName&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;Address1&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;City&#34;)%&#62;, &#60;%#DataBinder.Eval(Container.DataItem, &#34;State&#34;)%&#62;, &#60;%#DataBinder.Eval(Container.DataItem, &#34;Zip&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;Phone&#34;)%&#62;&#60;br&#62; &#60;span class=&#34;caption&#34;&#62;&#60;asp:LinkButton ID=&#34;lnkMakeDefault_Billing&#34; CommandName=&#34;MakeDefault_Billing&#34; runat=&#34;server&#34;&#62;Click to make Default Billing Address&#60;/asp:LinkButton&#62;&#60;/span&#62; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/' rel='bookmark' title='Asp.Net &#8211; Adding Parameters to CommandType.Text'>Asp.Net &#8211; Adding Parameters to CommandType.Text</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/08/Asp.Net-VB-Listview-ItemCommand-DataKeys-CommandName-SQL.jpg" alt="Asp.Net VB - Listview - ItemCommand - DataKeys - CommandName - SQL" title="Asp.Net VB - Listview - ItemCommand - DataKeys - CommandName - SQL" width="221" height="190" class="alignnone size-full wp-image-1388" /></p>
<p><strong>Here is a basic Listview that has an ItemCommand and ItemDataBound:</strong></p>
<p>Frontend Code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">&lt;asp:ListView ID=<span style="color: #800000;">&quot;lvAddresses&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> DataKeyNames=<span style="color: #800000;">&quot;AddressID,BillingAddressID,ShippingAddressID&quot;</span>&gt;
        &lt;LayoutTemplate&gt;
            &lt;asp:PlaceHolder ID=<span style="color: #800000;">&quot;itemPlaceholder&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;&lt;/asp:PlaceHolder&gt;
        &lt;/LayoutTemplate&gt;
        &lt;ItemTemplate&gt;
            &lt;table class=<span style="color: #800000;">&quot;noborder address_book&quot;</span> cellpadding=<span style="color: #800000;">&quot;0&quot;</span> cellspacing=<span style="color: #800000;">&quot;0&quot;</span>&gt;&lt;tbody&gt;
                &lt;tr&gt;
                    &lt;td colspan=<span style="color: #800000;">&quot;2&quot;</span>&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;FirstName&quot;</span>)%&gt; &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;LastName&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Address1&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;City&quot;</span>)%&gt;, &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;State&quot;</span>)%&gt;, &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Zip&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Phone&quot;</span>)%&gt;&lt;br&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:LinkButton ID=<span style="color: #800000;">&quot;lnkMakeDefault_Billing&quot;</span> CommandName=<span style="color: #800000;">&quot;MakeDefault_Billing&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;Click <span style="color: #8D38C9; font-weight: bold;">to</span> make Default Billing Address&lt;/asp:LinkButton&gt;&lt;/span&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:Literal ID=<span style="color: #800000;">&quot;litMakeDefault_Billing&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;Default Billing Address&quot;</span>&gt;&lt;/asp:Literal&gt;&lt;/span&gt;
                        &lt;br /&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:LinkButton ID=<span style="color: #800000;">&quot;lnkMakeDefault_Shipping&quot;</span> CommandName=<span style="color: #800000;">&quot;MakeDefault_Shipping&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;Click <span style="color: #8D38C9; font-weight: bold;">to</span> make Default Shipping Address&lt;/asp:LinkButton&gt;&lt;/span&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:Literal ID=<span style="color: #800000;">&quot;litMakeDefault_Shipping&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;Default Shipping Address&quot;</span>&gt;&lt;/asp:Literal&gt;&lt;/span&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID=<span style="color: #800000;">&quot;Button1&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;EDIT&quot;</span> CommandName=<span style="color: #800000;">&quot;EDITAddress&quot;</span>/&gt;
                    &lt;/td&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID=<span style="color: #800000;">&quot;btnREMOVE&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;REMOVE&quot;</span> CommandName=<span style="color: #800000;">&quot;REMOVEAddress&quot;</span>/&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tbody&gt;&lt;/table&gt;
&nbsp;
        &lt;/ItemTemplate&gt;
    &lt;/asp:ListView&gt;</pre></td></tr></table></div>

<p>Backend Code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">Protected <span style="color: #E56717; font-weight: bold;">Sub</span> Page_PreRender(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.EventArgs) Handles Me.PreRender
&nbsp;
        FindIt()
&nbsp;
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
    <span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> FindIt()
&nbsp;
        lblAddresses.Text = <span style="color: #800000;">&quot;&quot;</span>
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> sqlDataConnection <span style="color: #151B8D; font-weight: bold;">As</span> System.Data.SqlClient.SqlConnection = CDataAccess.OpenDatabase
        <span style="color: #151B8D; font-weight: bold;">Dim</span> conStr <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = sqlDataConnection.ConnectionString
        sqlDataConnection.<span style="color: #8D38C9; font-weight: bold;">Close</span>()
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> selectCommand <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = <span style="color: #800000;">&quot;SELECT Address.*, Customer.BillingAddressID, Customer.ShippingAddressID&quot;</span>
        selectCommand &amp;= <span style="color: #800000;">&quot; FROM Address INNER JOIN Customer ON Address.CustomerID = Customer.CustomerID&quot;</span>
        selectCommand &amp;= <span style="color: #800000;">&quot; WHERE Address.CustomerID = @CustomerID AND Address.Deleted = 0&quot;</span>
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> sds <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> SqlDataSource()
        sds.ConnectionString = conStr
        sds.SelectParameters.Clear()
&nbsp;
        sds.SelectParameters.Add(<span style="color: #800000;">&quot;CustomerID&quot;</span>, 12345)
        sds.SelectCommand = selectCommand
&nbsp;
        lvAddresses.DataSource = sds
        lvAddresses.DataBind()
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
    Protected <span style="color: #E56717; font-weight: bold;">Sub</span> lvAddresses_ItemCommand(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.Web.UI.WebControls.ListViewCommandEventArgs) Handles lvAddresses.ItemCommand
        <span style="color: #151B8D; font-weight: bold;">Dim</span> dataItem <span style="color: #151B8D; font-weight: bold;">As</span> ListViewDataItem = e.Item
        <span style="color: #151B8D; font-weight: bold;">Dim</span> currentDataKey <span style="color: #151B8D; font-weight: bold;">As</span> DataKey = lvAddresses.DataKeys(dataItem.DataItemIndex)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> AddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;AddressID&quot;</span>)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> BillingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;BillingAddressID&quot;</span>)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> ShippingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;ShippingAddressID&quot;</span>)
&nbsp;
        <span style="color: #008000;">'MakeDefault_Billing
</span>        <span style="color: #008000;">'MakeDefault_Shipping
</span>        <span style="color: #008000;">'EDITAddress
</span>        <span style="color: #008000;">'REMOVEAddress
</span>        <span style="color: #8D38C9; font-weight: bold;">If</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;MakeDefault_Billing&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            MakeDefault(AddressID, <span style="color: #00C2FF; font-weight: bold;">True</span>)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;MakeDefault_Shipping&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            MakeDefault(AddressID, <span style="color: #00C2FF; font-weight: bold;">False</span>)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;EDITAddress&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            EditAddress(AddressID)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;REMOVEAddress&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            RemoveAddress(AddressID)
        <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
    Protected <span style="color: #E56717; font-weight: bold;">Sub</span> lvAddresses_ItemDataBound(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.Web.UI.WebControls.ListViewItemEventArgs) Handles lvAddresses.ItemDataBound
        <span style="color: #151B8D; font-weight: bold;">Dim</span> dataItem <span style="color: #151B8D; font-weight: bold;">As</span> ListViewDataItem = e.Item
&nbsp;
        <span style="color: #8D38C9; font-weight: bold;">If</span> e.Item.ItemType = ListViewItemType.DataItem <span style="color: #8D38C9; font-weight: bold;">Then</span>
            <span style="color: #151B8D; font-weight: bold;">Dim</span> currentDataKey <span style="color: #151B8D; font-weight: bold;">As</span> DataKey = lvAddresses.DataKeys(dataItem.DataItemIndex)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> AddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;AddressID&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> BillingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;BillingAddressID&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> ShippingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;ShippingAddressID&quot;</span>)
            lit = e.Item.FindControl(<span style="color: #800000;">&quot;litMakeDefault_Billing&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> lit2 <span style="color: #151B8D; font-weight: bold;">As</span> Literal = e.Item.FindControl(<span style="color: #800000;">&quot;litMakeDefault_Shipping&quot;</span>)
            lnk = e.Item.FindControl(<span style="color: #800000;">&quot;lnkMakeDefault_Billing&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> lnk2 <span style="color: #151B8D; font-weight: bold;">As</span> LinkButton = e.Item.FindControl(<span style="color: #800000;">&quot;lnkMakeDefault_Shipping&quot;</span>)
&nbsp;
            lit.Visible = <span style="color: #8D38C9; font-weight: bold;">Not</span> lnk.Visible
        <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/' rel='bookmark' title='Asp.Net &#8211; Adding Parameters to CommandType.Text'>Asp.Net &#8211; Adding Parameters to CommandType.Text</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages</title>
		<link>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/</link>
		<comments>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:07:22 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[ASP Dot Net Store Front]]></category>
		<category><![CDATA[aspdnsf]]></category>
		<category><![CDATA[aspdnsf:Topic]]></category>
		<category><![CDATA[AspDotNetStorefront]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[DotNetStoreFront]]></category>
		<category><![CDATA[Store Front]]></category>
		<category><![CDATA[StoreFront]]></category>
		<category><![CDATA[Topic]]></category>
		<category><![CDATA[Topics]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[Xml Package]]></category>
		<category><![CDATA[XMLPackage]]></category>
		<category><![CDATA[XMLPackages]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1369</guid>
		<description><![CDATA[This is how you add a DotNetStoreFront&#8217;s Topic into a XMLPackage: &#60;xsl:value-of select=&#34;aspdnsf:Topic('TOPIC_NAME')&#34; disable-output-escaping=&#34;yes&#34;/&#62; Now, if you want to add it to a .aspx or .ascx page on dnsf: &#60;aspdnsf:Topic runat=&#34;server&#34; ID=&#34;Topic1&#34; TopicName=&#34;TOPIC_NAME&#34; /&#62;<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2009/02/23/aspdotnetstorefront-changing-max-file-upload-size/' rel='bookmark' title='AspDotNetStorefront &#8211; Changing Max File Upload Size'>AspDotNetStorefront &#8211; Changing Max File Upload Size</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><strong>This is how you add a DotNetStoreFront&#8217;s Topic into a XMLPackage:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">&lt;xsl:value-of <span style="color: #8D38C9; font-weight: bold;">select</span>=<span style="color: #800000;">&quot;aspdnsf:Topic('TOPIC_NAME')&quot;</span> disable-output-escaping=<span style="color: #800000;">&quot;yes&quot;</span>/&gt;</pre></td></tr></table></div>

<p><strong>Now, if you want to add it to a .aspx or .ascx page on dnsf:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">&lt;aspdnsf:Topic runat=<span style="color: #800000;">&quot;server&quot;</span> ID=<span style="color: #800000;">&quot;Topic1&quot;</span> TopicName=<span style="color: #800000;">&quot;TOPIC_NAME&quot;</span> /&gt;</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2009/02/23/aspdotnetstorefront-changing-max-file-upload-size/' rel='bookmark' title='AspDotNetStorefront &#8211; Changing Max File Upload Size'>AspDotNetStorefront &#8211; Changing Max File Upload Size</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP Pseudo Proxy</title>
		<link>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/</link>
		<comments>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 11:51:56 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[PHP Proxy]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Simple PHP Proxy]]></category>
		<category><![CDATA[stream_get_contents]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1363</guid>
		<description><![CDATA[This is the code for a simple php pseudo proxy. If you are blocked by a firewall and google cache isn&#8217;t working for some reason. You can use a url with this php file in it: &#60;?php $filename = $_GET&#91;&#34;url&#34;&#93;; if &#40;isset&#40;$filename&#41;&#41; &#123; $handle = fopen&#40;$filename, &#34;rb&#34;&#41;; $contents = stream_get_contents&#40;$handle&#41;; print $contents; fclose&#40;$handle&#41;; &#125; else [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy.jpg" alt="php proxy simple pseudo" title="php_simple_fake_proxy" width="335" height="74" class="alignnone size-full wp-image-1364" /></p>
<p>This is the code for a simple php pseudo proxy.  If you are blocked by a firewall and google cache isn&#8217;t working for some reason.  You can use a url with this php file in it:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">print</span> <span style="color: #000088;">$contents</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;form method=&quot;GET&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;url&quot; /&gt;&lt;input type=&quot;submit&quot;/&gt;
&lt;/form&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Then you can go to where the url is hosted and try something like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">index.php?url=http%3A%2F%2Fwww.last.fm%2Fuser%2Fdanfolkes%2Fcharts%3Frangetype%3D6month%26subtype%3Dartists</pre></td></tr></table></div>

<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Website Integration &#8211; HTML</title>
		<link>http://danfolkes.com/2011/05/25/facebook-website-integration-html/</link>
		<comments>http://danfolkes.com/2011/05/25/facebook-website-integration-html/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:40:03 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[a website]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook app]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Feedburner]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[integrate]]></category>
		<category><![CDATA[integrate Facebook]]></category>
		<category><![CDATA[rss feed]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1310</guid>
		<description><![CDATA[To integrate Facebook on to a website without the use of a facebook app you need these things: Facebook Page RSS Feed (can be tricky) Feedburner Account (free,easy) (here) Once you have both of those things you can do this in feedburner: Add a new feed (your facebook url) Go to the publicize tab Go [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/2011/05/25/facebook-website-integration-html/facebook-website-integration-%e2%80%93-html-3/" rel="attachment wp-att-1321"><img src="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2.jpg" alt="" title="Facebook-Website-Integration-–-HTML" width="400" height="252" class="alignnone size-full wp-image-1321" /></a><br />
To integrate Facebook on to a website without the use of a facebook app you need these things:</p>
<ul>
<li>Facebook Page RSS Feed (<a href="http://www.google.com/search?q=find+your+facebook+rss+feed&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t">can be tricky)</a></li>
<li>Feedburner Account (free,easy) (<a href="http://feedburner.google.com/">here</a>)</li>
</ul>
<p>Once you have both of those things you can do this in feedburner:</p>
<ul>
<li>Add a new feed (your facebook url)</li>
<li>Go to the publicize tab</li>
<li>Go to BuzzBoost</li>
<li>Sroll down and fill out the form, you will be given html code.</li>
<li>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro&quot; type=&quot;text/javascript&quot; &gt;&lt;/script&gt;
&lt;noscript&gt;&lt;p&gt;Subscribe to RSS headline updates from: 
&lt;a href=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates&quot;&gt;&lt;/a&gt;
&lt;br/&gt;Powered by FeedBurner&lt;/p&gt; 
&lt;/noscript&gt;</pre></td></tr></table></div>

</li>
<li>Preview:<script src="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro" type="text/javascript" ></script><noscript>
<p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates"></a><br/>Powered by FeedBurner</p>
<p> </noscript></li>
</ul>
<p>And that&#8217;s it!<br />
You can now style it up a little bit with some CSS and stuff.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/25/facebook-website-integration-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite</title>
		<link>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/</link>
		<comments>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/#comments</comments>
		<pubDate>Fri, 20 May 2011 16:21:10 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[DataAccess]]></category>
		<category><![CDATA[Global]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JAVA Global]]></category>
		<category><![CDATA[Java Singleton]]></category>
		<category><![CDATA[Singleton]]></category>
		<category><![CDATA[SingletonHolder.INSTANCE]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[sqlite4java]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1071</guid>
		<description><![CDATA[This will make a Java global object: import java.io.File; import java.io.IOException; &#160; import com.almworks.sqlite4java.SQLite; import com.almworks.sqlite4java.SQLiteConnection; import com.almworks.sqlite4java.SQLiteException; import com.almworks.sqlite4java.SQLiteJob; import com.almworks.sqlite4java.SQLiteQueue; import com.almworks.sqlite4java.SQLiteStatement; &#160; public final class DataAccess &#123; // Singleton Stuff private static class SingletonHolder &#123; public static final DataAccess INSTANCE = new DataAccess&#40;&#41;; &#125; public static DataAccess getInstance&#40;&#41; &#123; return SingletonHolder.INSTANCE; &#125; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This will make a Java global object:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.File</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.IOException</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLite</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteConnection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteJob</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteQueue</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteStatement</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> DataAccess <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Singleton Stuff</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">class</span> SingletonHolder <span style="color: #009900;">&#123;</span> 
	     <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> DataAccess INSTANCE <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DataAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> DataAccess getInstance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	     <span style="color: #000000; font-weight: bold;">return</span> SingletonHolder.<span style="color: #006633;">INSTANCE</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// End Singleton Stuff</span>
&nbsp;
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> HomePath <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">File</span> DBFile<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> SQLiteQueue queue<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">boolean</span> initalized <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> DataAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>initalized<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			initDB<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			initalized <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> initDB<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		DBFile <span style="color: #339933;">=</span> locateDBFile<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		DeleteDatabaseContents<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">File</span> locateDBFile<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003399;">File</span> f <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
			HomePath <span style="color: #339933;">=</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user.home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HomePath: &quot;</span> <span style="color: #339933;">+</span> HomePath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    f <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span>HomePath <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;/database.sqlite&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>f.<span style="color: #006633;">canRead</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    	    	<span style="color: #000000; font-weight: bold;">return</span> f<span style="color: #339933;">;</span>
    	    <span style="color: #000000; font-weight: bold;">else</span>
    	    <span style="color: #009900;">&#123;</span>
        	    <span style="color: #000066; font-weight: bold;">boolean</span> success <span style="color: #339933;">=</span> f.<span style="color: #006633;">createNewFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>success<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        	        <span style="color: #666666; font-style: italic;">// File did not exist and was created</span>
        	    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        	        <span style="color: #666666; font-style: italic;">// File already exists</span>
&nbsp;
        	    <span style="color: #009900;">&#125;</span>
    	    <span style="color: #009900;">&#125;</span>
    	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    		<span style="color: #666666; font-style: italic;">//Maybe try a new directory.</span>
    	<span style="color: #009900;">&#125;</span>
		<span style="color: #000000; font-weight: bold;">return</span> f<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> DeleteDatabaseContents<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		queue.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SQLiteJob<span style="color: #339933;">&lt;</span>Object<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#123;</span>
		    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #003399;">Object</span> job<span style="color: #009900;">&#40;</span>SQLiteConnection connection<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SQLiteException 
		    <span style="color: #009900;">&#123;</span>
		      <span style="color: #666666; font-style: italic;">// this method is called from database thread and passed the connection</span>
				StringBuilder sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DROP TABLE IF EXISTS Playlist;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DROP TABLE IF EXISTS Settings;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #666666; font-style: italic;">//sb.append(&quot;DELETE FROM someTable;&quot;);</span>
				<span style="color: #666666; font-style: italic;">//sb.append(&quot;DELETE FROM someTable;&quot;);</span>
&nbsp;
&nbsp;
				connection.<span style="color: #006633;">exec</span><span style="color: #009900;">&#40;</span>sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		    <span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> HomePath<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Now you can run this from anywhere:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">DataAccess da<span style="color: #339933;">;</span>
da <span style="color: #339933;">=</span> DataAccess.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Source: http://en.wikipedia.org/wiki/Singleton_pattern</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP API &#8211; Google Calendar &#8211; Updating Visibility</title>
		<link>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/</link>
		<comments>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:02:15 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[ClientLogin]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[event.private]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[gcalendar]]></category>
		<category><![CDATA[Gdata]]></category>
		<category><![CDATA[http://schemas.google.com/g/2005#event.private]]></category>
		<category><![CDATA[http://www.google.com/calendar/feeds/default/private]]></category>
		<category><![CDATA[newEventQuery]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[save()]]></category>
		<category><![CDATA[setVisibility]]></category>
		<category><![CDATA[Visibility]]></category>
		<category><![CDATA[visibility->value]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend_Gdata]]></category>
		<category><![CDATA[Zend_Gdata_Calendar]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1053</guid>
		<description><![CDATA[The Privacy / Visibility Part: $event-&#62;visibility-&#62;value = &#34;http://schemas.google.com/g/2005#event.private&#34;; Here it is in context: require_once 'Zend/Gdata/Extension/Visibility.php'; require_once 'Zend/Loader.php'; Zend_Loader::loadClass&#40;'Zend_Gdata'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_AuthSub'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_ClientLogin'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_Calendar'&#41;; &#160; $user = 'GOOGLEUSERNAME@gmail.com'; $pass = 'GOOGLEPASSWORD'; $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar $client = Zend_Gdata_ClientLogin::getHttpClient&#40;$user,$pass,$service&#41;; &#160; function outputCalendarByURL&#40;$client,$url&#41; &#123; $retVal = false; $gdataCal = new Zend_Gdata_Calendar&#40;$client&#41;; $query = $gdataCal-&#62;newEventQuery&#40;&#41;; $query-&#62;setUser&#40;'default'&#41;; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><strong>The Privacy / Visibility Part:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Here it is in context:<span id="more-1053"></span></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Gdata/Extension/Visibility.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Loader.php'</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_AuthSub'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_ClientLogin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_Calendar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEUSERNAME@gmail.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEPASSWORD'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$service</span> <span style="color: #339933;">=</span> Zend_Gdata_Calendar<span style="color: #339933;">::</span><span style="color: #004000;">AUTH_SERVICE_NAME</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// predefined service name for calendar</span>
<span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> Zend_Gdata_ClientLogin<span style="color: #339933;">::</span><span style="color: #004000;">getHttpClient</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span><span style="color: #000088;">$pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$service</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> outputCalendarByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newEventQuery</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setUser</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'default'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setVisibility</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'private'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setProjection</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'full'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setOrderby</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'starttime'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</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: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//print_r($event);</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">when</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//print_r($when);</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Starts: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">startTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Ends: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">endTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Content: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Link: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>hidden<span style="color: #000099; font-weight: bold;">\&quot;</span> value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>eid<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$retVal</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Events New Title&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://www.google.com/calendar/feeds/default/private/full/URLOFeventFROMevent_ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</title>
		<link>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/</link>
		<comments>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 23:57:12 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=975</guid>
		<description><![CDATA[This is the script I use that will: Automatically backup minecraft map Automatically update minecraft server Automatically restart the server if it stops or dies #!/bin/bash while &#91; true &#93;; do # make md5 of current file for update check. md5sum minecraft_server.jar &#62; minecraft_server.jar.md5 wget -o updatelog.log -N --trust-server-names http://www.minecraft.net/download/minecraft_server.jar # display updated status if [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This is the script I use that will: </p>
<ul>
<li>Automatically backup minecraft map</li>
<li>Automatically update minecraft server</li>
<li>Automatically restart the server if it stops or dies</li>
</ul>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
   <span style="color: #666666; font-style: italic;"># make md5 of current file for update check.</span>
   md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
   <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar
   <span style="color: #666666; font-style: italic;"># display updated status</span>
   <span style="color: #000000; font-weight: bold;">if</span> md5sum <span style="color: #660033;">-c</span> <span style="color: #660033;">--status</span> minecraft_server.jar.md5 
   <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Server Up to Date.&quot;</span>
   <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Updated Server!&quot;</span>
   <span style="color: #000000; font-weight: bold;">fi</span>
   java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui
   rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>dan<span style="color: #000000; font-weight: bold;">/</span>serv<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/home/dan/serv/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>Code Explained: </p>
<p>This will put the server in an infinite loop.  You can kill it by hitting Control+C a couple times in a row.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span></pre></td></tr></table></div>

<p>This will make a hash of the current minecraft_server.jar and then download the newest copy using wget.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar</pre></td></tr></table></div>

<p>This will run minecraft in headless mode and with a limit on RAM.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui</pre></td></tr></table></div>

<p>This will create a backup of the minecraft world folder in a backup folder. You probably should work on this part.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/path/to/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span></pre></td></tr></table></div>

<p>Well, hope this helps someone.  Have a good day.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow</title>
		<link>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/</link>
		<comments>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 16:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[auvPe]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[decrease]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[increase]]></category>
		<category><![CDATA[KB/s]]></category>
		<category><![CDATA[Limit]]></category>
		<category><![CDATA[Limit Speed]]></category>
		<category><![CDATA[newer]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[skip]]></category>
		<category><![CDATA[Slow]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Speed Limit]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Trickle]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=864</guid>
		<description><![CDATA[Install rsync and trickle: sudo apt-get install rsync sudo apt-get install trickle Now you can run rsync: This will download at a limit of 80 KB/s from host: rsync -auvPe &#34;trickle -d 80 ssh&#34; user@host:/src/ /dst/ Explanation of Commands: -a, --archive archive mode; equals -rlptgoD &#40;no -H,-A,-X&#41; -u, --update skip files that are newer on [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/' rel='bookmark' title='SSH/SCP/SFTP I love them all.'>SSH/SCP/SFTP I love them all.</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Install rsync and trickle:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> rsync
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> trickle</pre></td></tr></table></div>

<p>Now you can run rsync:<br />
This will download at a limit of 80 KB/s from host:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-auvPe</span> <span style="color: #ff0000;">&quot;trickle -d 80 ssh&quot;</span> user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>dst<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>

<p>Explanation of Commands:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">-a, <span style="color: #660033;">--archive</span>               archive mode; equals <span style="color: #660033;">-rlptgoD</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>no -H,-A,-X<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-u, <span style="color: #660033;">--update</span>                skip files that are newer on the receiver
-v, <span style="color: #660033;">--verbose</span>               increase verbosity
<span style="color: #660033;">-P</span>  <span style="color: #660033;">--progress</span>              show progress during transfer
-e, <span style="color: #660033;">--rsh</span>=COMMAND           specify the remote shell to use
trickle <span style="color: #660033;">-d</span> <span style="color: #000000;">80</span>  = <span style="color: #660033;">-d</span> rate    Limit the download bandwidth consumption to rate KB<span style="color: #000000; font-weight: bold;">/</span>s.</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/' rel='bookmark' title='SSH/SCP/SFTP I love them all.'>SSH/SCP/SFTP I love them all.</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook Rule : Only at Specific Times</title>
		<link>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/</link>
		<comments>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 16:20:29 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[after]]></category>
		<category><![CDATA[after hour]]></category>
		<category><![CDATA[after time]]></category>
		<category><![CDATA[certain time]]></category>
		<category><![CDATA[create rule]]></category>
		<category><![CDATA[creating a rule]]></category>
		<category><![CDATA[creating a rule in outlook]]></category>
		<category><![CDATA[forward outlook]]></category>
		<category><![CDATA[hours]]></category>
		<category><![CDATA[outlook email]]></category>
		<category><![CDATA[outlook rules]]></category>
		<category><![CDATA[receive emails]]></category>
		<category><![CDATA[redirect emails]]></category>
		<category><![CDATA[rule in outlook]]></category>
		<category><![CDATA[selected days]]></category>
		<category><![CDATA[specific time]]></category>
		<category><![CDATA[specific times]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=846</guid>
		<description><![CDATA[Lets say you want to have a rule in outlook send to you only between specific times in the day. Only after 6pm and before 8am Only on your lunch hour When you are not at work I will explain this by having emails forward to my cell phone, only when I am normally not [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/02/Outlook_Rule_Specific_Times.jpg" alt="" title="Outlook Rule Specific Times" width="444" height="386" class="alignnone size-full wp-image-852" /></p>
<p>Lets say you want to have a rule in outlook send to you only <strong>between specific times in the day</strong>.</p>
<ul>
<li><strong>Only after 6pm and before 8am</strong></li>
<li>Only on your lunch hour</li>
<li>When you are not at work</li>
</ul>
<p>I will explain this by having emails forward to my cell phone, only when I am normally not at the office. (From 6pm-8am) This way, I will be able to receive important emails that may require special outside assistance.</p>
<p><strong>What I do is:</strong></p>
<ul>
<li>Create a special category called FWD</li>
<li>Use other rules to set messages into the FWD category if I want them forwarded. (Explained Below)</li>
<li>Then, create a rule to run last in the rules list called FWD Rule</li>
<li><strong>*Important Part*</strong> This will check the time on the messages, if it&#8217;s within the specified hours, it will forward the email (Explained Below)</li>
</ul>
<p><strong>Creating a Rule to set the FWD Category:</strong><br />
Your <strong>Rule Description</strong> should look something like this. The important part is that it is assigning it to the FWD Category:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="txt" style="font-family:monospace;">Apply this rule after the message arrives
with 'Emergency from client' in the subject
    and marked as 'high importance'
    and assigned to 'FWD' Category</pre></td></tr></table></div>

<p>The Rule that will email header* for UTC times.  Make sure it&#8217;s assigned to the FWD category. And then FWD it:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="txt" style="font-family:monospace;">Apply this rule after the message arrives
with '2011 23:' or '2011 02:' or ... '2011 10:' in the message header
    and assigned to 'FWD' category
forward it to 'email@example.com'</pre></td></tr></table></div>

<p>* This should work on most emails, but if you want to look at the email header Right-click on the message in the Inbox and select Message Options.<br />
* I included the 2011 and the colon to make it more specific.</p>
<p>UTC Time for 6pm &#8211; 8am:<br />
Email Header contained:<br />
   X-OriginalArrivalTime: 18 Feb 2011 03:23:52.0368 (UTC)<br />
So I searched for:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="txt" style="font-family:monospace;">2011 23:,2011 01:,2011 02:,2011 03:,2011 04:,2011 05:,2011 06:,2011 07:,2011 08:,2011 09:,2011 10:,2011 11:</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</title>
		<link>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/</link>
		<comments>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 16:20:56 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=828</guid>
		<description><![CDATA[Here is the standard jQuery Ajax call with success handler as well as the ability to pass another parameter to an external function: $.ajax&#40;&#123; type: &#34;GET&#34;, url: Humancurl, dataType: &#34;xml&#34;, success: function&#40;data&#41;&#123; NameOfFunctionToParseReturnedData&#40;data,ExtraParameter&#41;; &#125; &#125;&#41;; Here is the standard jquery ajax call with success handler: $.ajax&#40;&#123; url: 'ajax/test.html', success: function&#40;data&#41; &#123; $&#40;'.result'&#41;.html&#40;data&#41;; alert&#40;'Load was performed.'+data&#41;; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors.jpg" alt="" title="jquery-ajax" width="377" height="272" class="alignnone size-full wp-image-559" /></p>
<p>Here is the standard jQuery Ajax call with success handler as well as the ability to pass another parameter to an external function:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">	$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>
			url<span style="color: #339933;">:</span> Humancurl<span style="color: #339933;">,</span>
			dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;xml&quot;</span><span style="color: #339933;">,</span>
			success<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				NameOfFunctionToParseReturnedData<span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span>ExtraParameter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Here is the standard jquery ajax call with success handler:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ajax/test.html'</span><span style="color: #339933;">,</span>
  success<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.result'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    alert<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Load was performed.'</span><span style="color: #339933;">+</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</title>
		<link>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/</link>
		<comments>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 21:13:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[/etc/samba/smb.conf]]></category>
		<category><![CDATA[777]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[chown cifs]]></category>
		<category><![CDATA[Cifs]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[FSTAB]]></category>
		<category><![CDATA[fstab cifs mount write]]></category>
		<category><![CDATA[fstab no cifs support]]></category>
		<category><![CDATA[guests]]></category>
		<category><![CDATA[invalid users = root]]></category>
		<category><![CDATA[Maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[Meerkat]]></category>
		<category><![CDATA[Mount]]></category>
		<category><![CDATA[noatime]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[read only = no]]></category>
		<category><![CDATA[read/write]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[smb.conf]]></category>
		<category><![CDATA[smbd]]></category>
		<category><![CDATA[sudo apt-get install samba]]></category>
		<category><![CDATA[sudo mount -a]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[usershare]]></category>
		<category><![CDATA[usershare allow guests = yes]]></category>
		<category><![CDATA[valid users]]></category>
		<category><![CDATA[writable]]></category>
		<category><![CDATA[writable = yes]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=724</guid>
		<description><![CDATA[This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes. One shares a read/write folder to the other. This is my setup. I think the key to this is having the same username on both computers having access to the files. You might have to run this on the the folder: sudo [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu.gif" alt="" title="Samba-SMBd-FSTAB-Ubuntu" width="373" height="297" class="alignnone size-full wp-image-727" /><br />
This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes.  One shares a read/write folder to the other. This is my setup.  I think the key to this is having the same username on  both  computers having access to the files.</p>
<p>You might have to run this on the the folder:<br />
<strong>sudo chmod -R 777 /path/to/files</strong><br />
<strong>sudo chown -R usernameonbothcomputers:usernameonbothcomputers /path/to/files</strong></p>
<p>I installed samba by doing: <strong>sudo apt-get install samba</strong></p>
<p><strong>/etc/samba/smb.conf</strong> :  (on the computer serving the files)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>global<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	workgroup = WORKGROUP
	server string = <span style="color: #000000; font-weight: bold;">%</span>h server <span style="color: #7a0874; font-weight: bold;">&#40;</span>Samba, Ubuntu<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	dns proxy = no
&nbsp;
	interfaces = 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span> eth0
	<span style="color: #7a0874; font-weight: bold;">bind</span> interfaces only = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	log <span style="color: #c20cb9; font-weight: bold;">file</span> = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>log.<span style="color: #000000; font-weight: bold;">%</span>m
	max log <span style="color: #c20cb9; font-weight: bold;">size</span> = <span style="color: #000000;">1000</span>
	syslog = <span style="color: #000000;">0</span>
&nbsp;
	panic action = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>panic-action <span style="color: #000000; font-weight: bold;">%</span>d
	encrypt passwords = <span style="color: #c20cb9; font-weight: bold;">true</span>
	passdb backend = tdbsam
	obey pam restrictions = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	unix password <span style="color: #c20cb9; font-weight: bold;">sync</span> = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> program = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #000000; font-weight: bold;">%</span>u
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> chat = <span style="color: #000000; font-weight: bold;">*</span>Enter\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>Retype\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>password\supdated\ssuccessfully<span style="color: #000000; font-weight: bold;">*</span> .
	pam password change = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	guest account = nobody
	invalid <span style="color: #c20cb9; font-weight: bold;">users</span> = root
	usershare allow guests = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MyFiles<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	path = <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>share
	writable = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">read</span> only = no
	valid <span style="color: #c20cb9; font-weight: bold;">users</span> = usernameonbothcomputers</pre></td></tr></table></div>

<p><strong>sudo /etc/init.d/smbd reload</strong></p>
<p><strong>/etc/fstab</strong> :  (on the computer accessing the files)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">//</span>SAMBASHAREsSERVERNAME<span style="color: #000000; font-weight: bold;">/</span>MyFiles <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">mount</span> cifs <span style="color: #c20cb9; font-weight: bold;">users</span>,,noatime,<span style="color: #007800;">username</span>=usernameonbothcomputers,<span style="color: #007800;">password</span>=theuserspassword <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>You should be able to run this to mount all things in your fstab:<br />
<strong>sudo mount -a </strong></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.Net &#8211; Sending Email with In Memory Attachment</title>
		<link>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/</link>
		<comments>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 16:43:32 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[attaches]]></category>
		<category><![CDATA[attachment]]></category>
		<category><![CDATA[Attachments]]></category>
		<category><![CDATA[Attachments.Add]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[FileUpload]]></category>
		<category><![CDATA[InputStream]]></category>
		<category><![CDATA[IsBodyHtml]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[MailAddress]]></category>
		<category><![CDATA[MailMessage]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[PostedFile]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[read/write]]></category>
		<category><![CDATA[Send]]></category>
		<category><![CDATA[SmtpClient]]></category>
		<category><![CDATA[subject]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=707</guid>
		<description><![CDATA[This VB.Net code takes the FileUpload control&#8217;s PostedFile and without saving it to the filesystem attaches it to an MailMessage and sends an email. Advantages: No threading, read/write permissions needed. One line of code. Front End: &#60;asp:FileUpload ID=&#34;fileUpload&#34; runat=&#34;server&#34; /&#62; Code: Dim m As New MailMessage() m.Attachments.Add(New Attachment(fileUpload.PostedFile.InputStream, fileUpload.FileName))<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2010/12/Sending_Email_with_In_Memory_Attachment.jpg" alt="" title="Sending_Email_with_In_Memory_Attachment" width="360" height="103" class="alignnone size-full wp-image-721" /></p>
<p>This VB.Net code takes the FileUpload control&#8217;s PostedFile and without saving it to the filesystem attaches it to an MailMessage and sends an email.</p>
<p>Advantages:</p>
<ul>
<li>No threading, read/write permissions needed.</li>
<li>One line of code.</li>
</ul>
<p>Front End:</p>
<pre>
&lt;asp:FileUpload ID=&quot;fileUpload&quot; runat=&quot;server&quot; /&gt;
</pre>
<p>Code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #151B8D; font-weight: bold;">Dim</span> m <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> MailMessage()
m.Attachments.Add(<span style="color: #E56717; font-weight: bold;">New</span> Attachment(fileUpload.PostedFile.InputStream, fileUpload.FileName))</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitchfork &#039;Best New Albums&#039; Torrent Search</title>
		<link>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/</link>
		<comments>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 16:41:43 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=623</guid>
		<description><![CDATA[Ok so this might be slightly illegal, but I am really just generating some links. I wrote some code that will take the RSS feed from this page: http://pitchfork.com/reviews/best/albums/ and searches BTJunkie for torrents. Here it is in action: http://danfolkes.com/pitchfork_torrent_albums_best/ Here is the source: (also here) 1 2 3 4 5 6 7 8 9 [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><a href="/pitchfork_torrent_albums_best/"><img src="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" alt="Pitchfork_Best_new_Music_BTJunkie_Search" title="Pitchfork_Best_new_Music_BTJunkie_Search" width="400" class="alignnone size-full" /></a></p>
<p>Ok so this might be slightly illegal, but I am really just generating some links.</p>
<p>I wrote some code that will take the RSS feed from this page: <a href="http://pitchfork.com/reviews/best/albums/">http://pitchfork.com/reviews/best/albums/</a> and searches BTJunkie for torrents.</p>
<blockquote><p><strong>Here it is in action:<br />
<a href="/pitchfork_torrent_albums_best/">http://danfolkes.com/pitchfork_torrent_albums_best/</a></strong></p></blockquote>
<p>Here is the source: (also <a href="/pitchfork_torrent_albums_best/source.txt">here</a>)</p>

<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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;table border=1&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds2.feedburner.com/PitchforkBestNewAlbums'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;th colspan='2'&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$doc2</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #000088;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://btjunkie.org/rss.xml?query=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/th&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' target='_blank'&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span><span style="color: #339933;">.=</span> <span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$link</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/td&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
  <span style="color: #666666; font-style: italic;">//print_r($arrFeeds);</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Base64_Encode &#8211; Intentionally screwing up pictures</title>
		<link>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/</link>
		<comments>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 20:48:18 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[base 64]]></category>
		<category><![CDATA[base 64 encode]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[fread]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[jpeg]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=608</guid>
		<description><![CDATA[So, I was a little bored so I made some PHP code. This is what it does: Takes query string values Pulls an image from the web base64_encodes it. Distorts the image. Replaces some of the base64 string data with other string data. Outputs the image in an img tag. Hope this helps someone, let [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2010/03/12/puppy-pictures/' rel='bookmark' title='Puppy Pictures'>Puppy Pictures</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<div id="attachment_611" class="wp-caption alignnone" style="width: 650px"><a href="http://danfolkes.com/index.php/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/index/" rel="attachment wp-att-611"><img src="http://danfolkes.com/wp-content/uploads/2010/09/index.jpg" alt="A screwed up base64 image.  Replaced all of the 'da' with 'ha'" title="index" width="640" height="427" class="size-full wp-image-611" /></a><p class="wp-caption-text">A screwed up base64 image. Replaced all of the 'da' with 'ha'</p></div>
<p>So, I was a little bored so I made some PHP code.</p>
<p>This is what it does:</p>
<ul>
<li>Takes query string values</li>
<li>Pulls an image from the web</li>
<li>base64_encodes it.</li>
<li>Distorts the image.</li>
<li>Replaces some of the base64 string data with other string data.</li>
<li>Outputs the image in an img tag.</li>
</ul>
<p><b>Hope this helps someone, <em>let me know if it does IN THE COMMENTS</em></b></p>

<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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$find</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$replace</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$imgfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$imgfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_ireplace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$find</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replace</span><span style="color: #339933;">,</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;data:image/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$type</span><span style="color: #339933;">.</span><span style="color: #0000ff;">';base64,'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$start</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
		Try: &lt;a href='base64.php?i=http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;r=ha&amp;t=gif'&gt;http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;re=ha&amp;t=gif&lt;/a&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2010/03/12/puppy-pictures/' rel='bookmark' title='Puppy Pictures'>Puppy Pictures</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</title>
		<link>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/</link>
		<comments>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 19:51:40 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Forms Authentication]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[Quick]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web.conf]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=574</guid>
		<description><![CDATA[I use the login page from here: http://www.15seconds.com/issue/020220.htm &#60;!-- Web.Config Configuration File --&#62; &#160; &#60;configuration&#62; &#160; &#60;system.web&#62; &#60;customErrors mode=&#34;Off&#34;/&#62; &#60;compilation debug=&#34;true&#34;/&#62; &#160; &#60;authentication mode=&#34;Forms&#34;&#62; &#60;forms loginUrl=&#34;FeedBack_Admin/login.aspx&#34; protection=&#34;All&#34; timeout=&#34;30&#34;&#62; &#60;credentials passwordFormat=&#34;Clear&#34;&#62; &#60;user name=&#34;admin&#34; password=&#34;pass&#34;/&#62; &#60;/credentials&#62; &#60;/forms&#62; &#60;/authentication&#62; &#60;authorization&#62; &#60;allow users=&#34;*&#34; /&#62; &#60;/authorization&#62; &#60;/system.web&#62; &#160; &#60;location path=&#34;FeedBack_Admin&#34;&#62; &#60;system.web&#62; &#60;authorization&#62; &#60;deny users=&#34;?&#34; /&#62; &#60;/authorization&#62; &#60;/system.web&#62; &#60;/location&#62; &#60;location path=&#34;Content_Admin&#34;&#62; [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2008/04/21/qrquick-response-codes/' rel='bookmark' title='QR(Quick Response) Codes'>QR(Quick Response) Codes</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>I use the login page from here:<br />
<a target="_blank" href="http://www.15seconds.com/issue/020220.htm">http://www.15seconds.com/issue/020220.htm</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="vb" style="font-family:monospace;">&lt;!-- Web.Config Configuration File --&gt;
&nbsp;
&lt;configuration&gt;
&nbsp;
  &lt;system.web&gt;
    &lt;customErrors mode=<span style="color: #800000;">&quot;Off&quot;</span>/&gt;
    &lt;compilation debug=<span style="color: #800000;">&quot;true&quot;</span>/&gt;
&nbsp;
    &lt;authentication mode=<span style="color: #800000;">&quot;Forms&quot;</span>&gt;
      &lt;forms loginUrl=<span style="color: #800000;">&quot;FeedBack_Admin/login.aspx&quot;</span> protection=<span style="color: #800000;">&quot;All&quot;</span> timeout=<span style="color: #800000;">&quot;30&quot;</span>&gt;
        &lt;credentials passwordFormat=<span style="color: #800000;">&quot;Clear&quot;</span>&gt;
          &lt;user name=<span style="color: #800000;">&quot;admin&quot;</span> password=<span style="color: #800000;">&quot;pass&quot;</span>/&gt;
        &lt;/credentials&gt;
      &lt;/forms&gt;
    &lt;/authentication&gt;
    &lt;authorization&gt;
      &lt;allow users=<span style="color: #800000;">&quot;*&quot;</span> /&gt;
    &lt;/authorization&gt;
  &lt;/system.web&gt;
&nbsp;
  &lt;location path=<span style="color: #800000;">&quot;FeedBack_Admin&quot;</span>&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users=<span style="color: #800000;">&quot;?&quot;</span> /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
  &lt;/location&gt;
  &lt;location path=<span style="color: #800000;">&quot;Content_Admin&quot;</span>&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users=<span style="color: #800000;">&quot;?&quot;</span> /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
  &lt;/location&gt;
&lt;/configuration&gt;</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2008/04/21/qrquick-response-codes/' rel='bookmark' title='QR(Quick Response) Codes'>QR(Quick Response) Codes</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: danfolkes.com @ 2013-05-25 04:36:36 by W3 Total Cache -->