<?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>ASPDesigns.com</title>
	<atom:link href="http://aspdesigns.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aspdesigns.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 11 Oct 2009 16:26:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Twitter Weekly Updates for 2009-10-04</title>
		<link>http://aspdesigns.com/twitter-weekly-updates-for-2009-10-04/</link>
		<comments>http://aspdesigns.com/twitter-weekly-updates-for-2009-10-04/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 21:00:00 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tweets]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/2009/10/04/twitter-weekly-updates-for-2009-10-04/</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/twitter-weekly-updates-for-2009-10-04/',size:'large'} Want to make a catalog of your website items? Go to webtocatalog.com and sign up for beta testing. # RT @blulyne: Do you have an ecommerce site? I want to make you a sample catalog.. http://webtocatalog.com # RT @blulyne: Do you have an ecommerce site? How about a physical catalog [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Ftwitter-weekly-updates-for-2009-10-04%2F&amp;t=Twitter+Weekly+Updates+for+2009-10-04&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Ftwitter-weekly-updates-for-2009-10-04%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/twitter-weekly-updates-for-2009-10-04/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><ul class="aktt_tweet_digest">
<li>Want to make a catalog of your website items? Go to webtocatalog.com and sign up for beta testing. <a href="http://twitter.com/aspdesigns/statuses/4515415993" class="aktt_tweet_time">#</a></li>
<li>RT @blulyne: Do you have an ecommerce site?  I want to make you a sample catalog.. <a href="http://webtocatalog.com" rel="nofollow">http://webtocatalog.com</a> <a href="http://twitter.com/aspdesigns/statuses/4564068154" class="aktt_tweet_time">#</a></li>
<li>RT @blulyne: Do you have an ecommerce site?  How about a physical catalog in minutes?  Beta Testers Wanted - <a href="http://webtocatalog.com" rel="nofollow">http://webtocatalog.com</a> <a href="http://twitter.com/aspdesigns/statuses/4596849457" class="aktt_tweet_time">#</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/twitter-weekly-updates-for-2009-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2009-09-20</title>
		<link>http://aspdesigns.com/twitter-weekly-updates-for-2009-09-20/</link>
		<comments>http://aspdesigns.com/twitter-weekly-updates-for-2009-09-20/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 21:00:00 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tweets]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/2009/09/20/twitter-weekly-updates-for-2009-09-20/</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/twitter-weekly-updates-for-2009-09-20/',size:'large'} What is the best file format to get a broad audince to upload data in? xml, xls, csv etc? #]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Ftwitter-weekly-updates-for-2009-09-20%2F&amp;t=Twitter+Weekly+Updates+for+2009-09-20&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Ftwitter-weekly-updates-for-2009-09-20%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/twitter-weekly-updates-for-2009-09-20/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><ul class="aktt_tweet_digest">
<li>What is the best file format to get a broad audince to upload data in?  xml, xls, csv etc? <a href="http://twitter.com/aspdesigns/statuses/4018449900" class="aktt_tweet_time">#</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/twitter-weekly-updates-for-2009-09-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Send Email Function for Classic ASP using CDO</title>
		<link>http://aspdesigns.com/simple-send-email-function-for-classic-asp-using-cdo/</link>
		<comments>http://aspdesigns.com/simple-send-email-function-for-classic-asp-using-cdo/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 02:02:43 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/?p=25</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/simple-send-email-function-for-classic-asp-using-cdo/',size:'large'}Here is a simple function you can use to email via CDO from Classic ASP.  Just create an include file with the following code and use a one line function call anywhere you want to send an email from. Works with attachments, html or text. Here is the include file: 1 [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Fsimple-send-email-function-for-classic-asp-using-cdo%2F&amp;t=Simple+Send+Email+Function+for+Classic+ASP+using+CDO&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Fsimple-send-email-function-for-classic-asp-using-cdo%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/simple-send-email-function-for-classic-asp-using-cdo/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><p>Here is a simple function you can use to email via CDO from Classic ASP.  Just create an include file with the following code and use a one line function call anywhere you want to send an email from.</p>
<p>Works with attachments, html or text.</p>
<p>Here is the include file:</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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">smtp_mail_server=<span style="color: #800000;">&quot;YOUR MAIL SERVER&quot;</span>
&nbsp;
<span style="color: #000080;">function</span> xsendmail (xto,xbcc,xfrom,xsubject,xhtml,xbody,xatt)
&nbsp;
<span style="color: #000080;">set</span> imsg = createobject(<span style="color: #800000;">&quot;cdo.message&quot;</span>)
	<span style="color: #000080;">set</span> iconf = createobject(<span style="color: #800000;">&quot;cdo.configuration&quot;</span>)
&nbsp;
	<span style="color: #000080;">Set</span> Flds = iConf.Fields
	<span style="color: #000080;">With</span> Flds
&nbsp;
        <span style="color: #008000;">'Set to 1 if you have SMTP on the webserver, else set to 2 to use another SMTP server
</span>	.Item(<span style="color: #800000;">&quot;http://schemas.microsoft.com/cdo/configuration/sendusing&quot;</span>) = 2
&nbsp;
        <span style="color: #008000;">'If you need SSL uncomment following line
</span>        <span style="color: #008000;">'.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpusessl&quot;) = &quot;true&quot;
</span>
&nbsp;
        <span style="color: #008000;">'SMTP Address set above
</span>	.Item(<span style="color: #800000;">&quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&quot;</span>) = smtp_mail_server
&nbsp;
        <span style="color: #008000;">'If your smtp server requires authentication, then set the following to 1, else comment out next 3 lines
</span>        .Item(<span style="color: #800000;">&quot;http://schemas.microsoft.com/cdo/configuration/smtpauthenticate&quot;</span>) = 1
	.Item(<span style="color: #800000;">&quot;http://schemas.microsoft.com/cdo/configuration/sendusername&quot;</span>) = <span style="color: #800000;">&quot;YOUR EMAIL USER NAME&quot;</span>
	.Item(<span style="color: #800000;">&quot;http://schemas.microsoft.com/cdo/configuration/sendpassword&quot;</span>) = <span style="color: #800000;">&quot;YOUR EMAIL PASSWORD&quot;</span>
&nbsp;
        .Update
	<span style="color: #000080;">End</span> <span style="color: #000080;">With</span>
&nbsp;
	<span style="color: #000080;">With</span> iMsg
		<span style="color: #000080;">Set</span> .Configuration = iConf
			.<span style="color: #000080;">To</span> = xto
			<span style="color: #000080;">if</span> xbcc &lt;&gt; <span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">then</span>
			.BCC = xbcc
			<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
			.From = xfrom
			.Subject = xsubject
			<span style="color: #000080;">if</span> (xhtml) <span style="color: #000080;">then</span>
			.HTMLbody = xbody
			<span style="color: #000080;">else</span>
			.TEXTBody  = xbody
			<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
			.fields.update
			.Send
	<span style="color: #000080;">End</span> <span style="color: #000080;">With</span>
&nbsp;
	<span style="color: #000080;">set</span> iconf = <span style="color: #000080;">nothing</span>
<span style="color: #000080;">set</span> imsg = <span style="color: #000080;">nothing</span>
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">function</span></pre></td></tr></table></div>

<p>Now, from any page that you include the above file in, you can call the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">to_name=<span style="color: #800000;">&quot;Fred Flintstone&quot;</span>
to_email=<span style="color: #800000;">&quot;fred@bedrock.com&quot;</span>
from_name=<span style="color: #800000;">&quot;Barney Rubble&quot;</span>
bcc=<span style="color: #800000;">&quot;wilma@bedrock.com&quot;</span> <span style="color: #008000;">'optional
</span>from_email=<span style="color: #800000;">&quot;barney@thequary.com&quot;</span>
subject=<span style="color: #800000;">&quot;Bowling&quot;</span>
body=<span style="color: #800000;">&quot;Hello, this is a test email.&quot;</span>
html=0 <span style="color: #008000;">'0 for text or 1 for html
</span>att_name=<span style="color: #800000;">&quot;&quot;</span> <span style="color: #008000;">' include file location on server if you want to add an attachment
</span>
xsendmail to_name &amp; <span style="color: #800000;">&quot;&lt;&quot;</span> &amp; to_email &amp; <span style="color: #800000;">&quot;&gt;&quot;</span>,bcc,from_name &amp; <span style="color: #800000;">&quot;&lt;&quot;</span> &amp; from_email &amp; <span style="color: #800000;">&quot;&gt;&quot;</span> ,subject,html,body,att_name</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/simple-send-email-function-for-classic-asp-using-cdo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Updates for 2009-09-15</title>
		<link>http://aspdesigns.com/twitter-updates-for-2009-09-15/</link>
		<comments>http://aspdesigns.com/twitter-updates-for-2009-09-15/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 01:00:00 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tweets]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/2009/09/15/twitter-updates-for-2009-09-15/</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-15/',size:'large'} What is the best file format to get a broad audince to upload data in? xml, xls, csv etc? #]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-15%2F&amp;t=Twitter+Updates+for+2009-09-15&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-15%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-15/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><ul class="aktt_tweet_digest">
<li>What is the best file format to get a broad audince to upload data in?  xml, xls, csv etc? <a href="http://twitter.com/aspdesigns/statuses/4018449900" class="aktt_tweet_time">#</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/twitter-updates-for-2009-09-15/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Updates for 2009-09-12</title>
		<link>http://aspdesigns.com/twitter-updates-for-2009-09-12/</link>
		<comments>http://aspdesigns.com/twitter-updates-for-2009-09-12/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 01:00:00 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tweets]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/2009/09/12/twitter-updates-for-2009-09-12/</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-12/',size:'large'} framework for catalog generator getting close to completion. Want to beta test? blulyne.com #]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-12%2F&amp;t=Twitter+Updates+for+2009-09-12&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-12%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-12/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><ul class="aktt_tweet_digest">
<li>framework for catalog generator getting close to completion.  Want to beta test? blulyne.com <a href="http://twitter.com/aspdesigns/statuses/3947960645" class="aktt_tweet_time">#</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/twitter-updates-for-2009-09-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Updates for 2009-09-06</title>
		<link>http://aspdesigns.com/twitter-updates-for-2009-09-06/</link>
		<comments>http://aspdesigns.com/twitter-updates-for-2009-09-06/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 01:00:00 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tweets]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/2009/09/06/twitter-updates-for-2009-09-06/</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-06/',size:'large'} Thinking of going to BlogWorld and New Media Expo in Vegas next month. Is it worth it? #]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-06%2F&amp;t=Twitter+Updates+for+2009-09-06&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Ftwitter-updates-for-2009-09-06%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/twitter-updates-for-2009-09-06/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><ul class="aktt_tweet_digest">
<li>Thinking of going to BlogWorld and New Media Expo in Vegas next month.  Is it worth it? <a href="http://twitter.com/aspdesigns/statuses/3810622299" class="aktt_tweet_time">#</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/twitter-updates-for-2009-09-06/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling the UPS ratefinder API in Classic ASP</title>
		<link>http://aspdesigns.com/calling-the-ups-ratefinder-api-in-classic-asp/</link>
		<comments>http://aspdesigns.com/calling-the-ups-ratefinder-api-in-classic-asp/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 19:03:10 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/?p=19</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/calling-the-ups-ratefinder-api-in-classic-asp/',size:'large'}Last week I started this blog with some quick and dirty code for calling the rate finder API from the USPS. As with most API's, Classic ASP samples are hard to come by these days. So here is a sample of the UPS code. Remember, you have to have a web [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Fcalling-the-ups-ratefinder-api-in-classic-asp%2F&amp;t=Calling+the+UPS+ratefinder+API+in+Classic+ASP&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Fcalling-the-ups-ratefinder-api-in-classic-asp%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/calling-the-ups-ratefinder-api-in-classic-asp/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><p>Last week I started this blog with some quick and dirty code for calling the rate finder API from the USPS.  As with most API's, Classic ASP samples are hard to come by these days.  So here is a sample of the UPS code.  Remember, you have to have a web tools account with UPS which you can get here.</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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">&lt;%
&nbsp;
&nbsp;
ship_to_zip=33323
weight=5
package_length=6
package_width=6
package_height=6
residential=<span style="color: #000080;">true</span>
&nbsp;
&nbsp;
xml_request= <span style="color: #800000;">&quot;&lt;?xml version='1.0'?&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;accessRequest xml:lang='en-US'&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;accessLicenseNumber&gt;YOUR_ACCESS_LICENSE_NUMBER&lt;/accessLicenseNumber&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;userId&gt;YOUR_USER_NAME&lt;/userId&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;password&gt;YOUR_PASSWORD&lt;/password&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/accessRequest&gt;&quot;</span>
&nbsp;
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;?xml version='1.0'?&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;ratingServiceSelectionRequest xml:lang='en-US'&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;request&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;transactionReference&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;customerContext&gt;Rating and Service&lt;/customerContext&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;xpciVersion&gt;1.0001&lt;/xpciVersion&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/transactionReference&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;requestAction&gt;Rate&lt;/requestAction&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;requestOption&gt;Rate&lt;/requestOption&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/request&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;pickupType&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;code&gt;01&lt;/code&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/pickupType&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;shipment&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;shipper&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;shipperNumber&gt;YOUR_SHIPPER_NUMBER&lt;/shipperNumber&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;address&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;postalCode&gt;YOUR_POSTAL_CODE&lt;/postalCode&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/address&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/shipper&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;shipTo&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;address&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;postalCode&gt;&quot;</span> &amp; ship_to_zip &amp; <span style="color: #800000;">&quot;&lt;/postalCode&gt;&quot;</span>
<span style="color: #000080;">if</span> (residential) <span style="color: #000080;">then</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;residentialAddressIndicator/&gt;&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/address&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/shipTo&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;service&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;code&gt;&quot;</span> &amp; ups_code &amp; <span style="color: #800000;">&quot;&lt;/code&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/service&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;package&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;packagingType&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;code&gt;02&lt;/code&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;description&gt;Package&lt;/description&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/packagingType&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;description&gt;Rate Shopping&lt;/description&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;packageWeight&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;weight&gt;&quot;</span> &amp; weight &amp; <span style="color: #800000;">&quot;&lt;/weight&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/packageWeight&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;dimensions&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;length&gt;&quot;</span> &amp; package_length &amp; <span style="color: #800000;">&quot;&lt;/length&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;width&gt;&quot;</span> &amp; package_width &amp; <span style="color: #800000;">&quot;&lt;/width&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;height&gt;&quot;</span> &amp; package_height &amp; <span style="color: #800000;">&quot;&lt;/height&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/dimensions&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/package&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;shipmentServiceOptions/&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/shipment&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/ratingServiceSelectionRequest&gt;&quot;</span>
&nbsp;
<span style="color: #008000;">'uncomment to see response in case of error
</span><span style="color: #008000;">'response.write xml_request
</span>
URLToRSS = <span style="color: #800000;">&quot;https://wwwcie.ups.com/ups.app/xml/Rate&quot;</span>
&nbsp;
<span style="color: #000080;">Set</span> xmlHttp = Server.CreateObject(<span style="color: #800000;">&quot;MSXML2.ServerXMLHTTP.3.0&quot;</span>)
<span style="color: #008000;">' resolve, connect, send, receive - in milliseconds
</span>xmlHttp.setTimeouts 10000, 60000, 10000, 10000
xmlHttp.<span style="color: #000080;">Open</span> <span style="color: #800000;">&quot;Post&quot;</span>, URLToRSS, <span style="color: #000080;">false</span>
&nbsp;
xmlHttp.Send(xml_request)
<span style="color: #000080;">set</span> RSSXML = xmlHttp.ResponseXML
&nbsp;
<span style="color: #000080;">Set</span> xmlDOM = Server.CreateObject(<span style="color: #800000;">&quot;MSXML2.DOMDocument.3.0&quot;</span>)
xmlDOM.async = <span style="color: #000080;">false</span>
xmlDOM.setProperty <span style="color: #800000;">&quot;SelectionLanguage&quot;</span>, <span style="color: #800000;">&quot;XPath&quot;</span>
xmlDOM.Load(RSSXML)
&nbsp;
<span style="color: #000080;">if</span> xmlDOM.parseError.errorCode &lt;&gt; 0 <span style="color: #000080;">then</span>
&nbsp;
response.write <span style="color: #800000;">&quot;DOM Not Loaded&quot;</span>
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
&nbsp;
<span style="color: #008000;">'check for error
</span>xmlQuery = <span style="color: #800000;">&quot;*/Error&quot;</span>
&nbsp;
<span style="color: #000080;">set</span> errorNode = xmlDOM.documentElement.selectNodes(xmlQuery)
&nbsp;
<span style="color: #000080;">if</span> <span style="color: #000080;">not</span> errorNode <span style="color: #000080;">is</span> <span style="color: #000080;">nothing</span> <span style="color: #000080;">then</span>
	errorLength = errorNode.length
		<span style="color: #000080;">if</span> errorLength &gt; 0 <span style="color: #000080;">then</span>
			rate_error_severity= errorNode.item(0).selectSingleNode(<span style="color: #800000;">&quot;ErrorSeverity&quot;</span>).nodeTypedValue
			rate_error_code= errorNode.item(0).selectSingleNode(<span style="color: #800000;">&quot;ErrorCode&quot;</span>).nodeTypedValue
			rate_error_description= errorNode.item(0).selectSingleNode(<span style="color: #800000;">&quot;ErrorDescription&quot;</span>).nodeTypedValue
		<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
&nbsp;
<span style="color: #000080;">if</span> rate_error_severity=<span style="color: #800000;">&quot;Hard&quot;</span> <span style="color: #000080;">then</span>
&nbsp;
	total= 0
	rate_error= rate_error_description
	<span style="color: #008000;">'response.end()
</span>
<span style="color: #000080;">else</span>
&nbsp;
rate_error=<span style="color: #800000;">&quot;&quot;</span>
&nbsp;
xmlQuery = <span style="color: #800000;">&quot;/RatingServiceSelectionResponse/RatedShipment&quot;</span>
<span style="color: #000080;">set</span> docHeadlines = xmlDOM.documentElement.selectNodes(xmlQuery)
&nbsp;
total= docHeadlines.item(0).selectSingleNode(<span style="color: #800000;">&quot;TotalCharges&quot;</span>).selectSingleNode(<span style="color: #800000;">&quot;MonetaryValue&quot;</span>).nodeTypedValue
GuaranteedDaysToDelivery= docHeadlines.item(0).selectSingleNode(<span style="color: #800000;">&quot;GuaranteedDaysToDelivery&quot;</span>).nodeTypedValue
ScheduledDeliveryTime= docHeadlines.item(0).selectSingleNode(<span style="color: #800000;">&quot;ScheduledDeliveryTime&quot;</span>).nodeTypedValue
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
%&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/calling-the-ups-ratefinder-api-in-classic-asp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Calling the USPS API via Classic ASP</title>
		<link>http://aspdesigns.com/calling-the-usps-api-via-classic-asp/</link>
		<comments>http://aspdesigns.com/calling-the-usps-api-via-classic-asp/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 01:34:50 +0000</pubDate>
		<dc:creator>Ben Newton</dc:creator>
				<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[USPS]]></category>

		<guid isPermaLink="false">http://aspdesigns.com/?p=3</guid>
		<description><![CDATA[var fbShare = {url: 'http://aspdesigns.com/calling-the-usps-api-via-classic-asp/',size:'large'}For years I have been thinking about writing an asp interface for the UPS and USPS rate finder API.  But since I had a com component installed on the one server I used it on, I always put it off and used the component.  As luck would have it, one Sunday [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table border=0 bgcolor=#ffffff> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Faspdesigns.com%2Fcalling-the-usps-api-via-classic-asp%2F&amp;t=Calling+the+USPS+API+via+Classic+ASP&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Faspdesigns.com%2Fcalling-the-usps-api-via-classic-asp%2F&amp;source=aspdesigns&amp;style=normal ' height='61' width='50' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {url: 'http://aspdesigns.com/calling-the-usps-api-via-classic-asp/',size:'large'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><p>For years I have been thinking about writing an asp interface for the UPS and USPS rate finder API.  But since I had a com component installed on the one server I used it on, I always put it off and used the component.  As luck would have it, one Sunday a few weeks ago (it's always a Sunday) the component decided to return errors from UPS.  Of course, the component writer is long gone, so it was time to write the interface I had been contemplating for years.  Now mind you, this was on a very busy ecommerce site, so I was in a rush.</p>
<p>Surprisingly, I had some asp code up and running quickly.  Here is the simple code in ASP that calls the USPS API and reads the results.  This can be plugged in easily into any code that needs the USPS rate.</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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">&lt;%
<span style="color: #008000;">'needs the following variables
</span>
weight=1
ship_to_zip=33323
package_width=6
package_length=6
<span style="color: #008000;">'package_height=6
</span>
<span style="color: #000080;">if</span> int(weight) &lt;&gt; weight <span style="color: #000080;">then</span>
	weight=int(weight) + 1
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
&nbsp;
<span style="color: #000080;">if</span> package_width &lt; 6 <span style="color: #000080;">then</span> package_width=6
<span style="color: #000080;">if</span> package_length &lt; 6 <span style="color: #000080;">then</span> package_length=6
<span style="color: #000080;">if</span> package_height &lt; 6 <span style="color: #000080;">then</span> package_height=6
&nbsp;
xml_request= <span style="color: #800000;">&quot;&lt;?xml version='1.0'?&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;rateV3Request USERID='YOUR_USERID'&gt;&quot;</span>
&nbsp;
<span style="color: #000080;">if</span> usps_service=<span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">then</span>
usps_service=<span style="color: #800000;">&quot;PRIORITY&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
&nbsp;
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;package ID='1ST'&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;service&gt;&quot;</span> &amp; usps_service &amp; <span style="color: #800000;">&quot;&lt;/service&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;zipOrigination&gt;33323&lt;/zipOrigination&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;zipDestination&gt;&quot;</span> &amp; ship_to_zip &amp; <span style="color: #800000;">&quot;&lt;/zipDestination&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;pounds&gt;&quot;</span> &amp; weight &amp; <span style="color: #800000;">&quot;&lt;/pounds&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;ounces&gt;0&lt;/ounces&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;container&gt;&lt;/container&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;size&gt;REGULAR&lt;/size&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;width&gt;&quot;</span> &amp; package_width &amp; <span style="color: #800000;">&quot;&lt;/width&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;length&gt;&quot;</span> &amp; package_length &amp; <span style="color: #800000;">&quot;&lt;/length&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;height&gt;&quot;</span> &amp; package_height &amp; <span style="color: #800000;">&quot;&lt;/height&gt;&quot;</span>
<span style="color: #008000;">'xml_request = xml_request &amp; &quot;&lt;girth&gt;55&lt;/girth&gt;&quot;
</span><span style="color: #000080;">if</span> usps_service=<span style="color: #800000;">&quot;PARCEL POST&quot;</span> <span style="color: #000080;">then</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;machinable&gt;true&lt;/machinable&gt;&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/package&gt;&quot;</span>
xml_request = xml_request &amp; <span style="color: #800000;">&quot;&lt;/rateV3Request&gt;&quot;</span>
&nbsp;
URLToRSS = <span style="color: #800000;">&quot;http://Production.ShippingAPIs.com/ShippingAPI.dll&quot;</span>
&nbsp;
<span style="color: #000080;">Set</span> xmlHttp = Server.CreateObject(<span style="color: #800000;">&quot;MSXML2.ServerXMLHTTP.3.0&quot;</span>)
xmlHttp.<span style="color: #000080;">Open</span> <span style="color: #800000;">&quot;Post&quot;</span>, URLToRSS, <span style="color: #000080;">false</span>
xmlHttp.Send(<span style="color: #800000;">&quot;API=RateV3&amp;XML=&quot;</span> &amp; xml_request)
&nbsp;
<span style="color: #008000;">'uncomment below to see what USPS API is returning
</span><span style="color: #008000;">'Response.write xmlHttp.ResponseTEXT
</span>
<span style="color: #000080;">Set</span> xmlDOM = Server.CreateObject(<span style="color: #800000;">&quot;MSXML2.DOMDocument.3.0&quot;</span>)
xmlDOM.async = <span style="color: #000080;">false</span>
xmlDOM.setProperty <span style="color: #800000;">&quot;SelectionLanguage&quot;</span>, <span style="color: #800000;">&quot;XPath&quot;</span>
xmlDOM.LoadXML xmlHttp.ResponseTEXT
&nbsp;
<span style="color: #000080;">if</span> xmlDOM.parseError.errorCode &lt;&gt; 0 <span style="color: #000080;">then</span>
&nbsp;
	response.write <span style="color: #800000;">&quot;DOM Not Loaded&quot;</span>
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
&nbsp;
xmlQuery = <span style="color: #800000;">&quot;/RateV3Response/Package/Postage&quot;</span>
<span style="color: #000080;">set</span> docHeadlines = xmlDOM.documentElement.selectNodes(xmlQuery)
rate_error=<span style="color: #800000;">&quot;&quot;</span>
total=0
total= docHeadlines.item(0).selectSingleNode(<span style="color: #800000;">&quot;Rate&quot;</span>).nodeTypedValue
&nbsp;
<span style="color: #008000;">'returns total with rate
</span>%&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://aspdesigns.com/calling-the-usps-api-via-classic-asp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

