<?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>Algirdas Varnagiris &#187; Internet</title>
	<atom:link href="http://www.varnagiris.net/category/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.varnagiris.net</link>
	<description>The cyber-place where I live</description>
	<lastBuildDate>Thu, 18 Feb 2010 17:19:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ajax feedback form using jQuery &amp; Boxy plugin</title>
		<link>http://www.varnagiris.net/2009/04/11/ajax-feedback-form-using-jquery-boxy-plugin/</link>
		<comments>http://www.varnagiris.net/2009/04/11/ajax-feedback-form-using-jquery-boxy-plugin/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 06:50:54 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/?p=102</guid>
		<description><![CDATA[I really enjoy jQuery and its capabilities. It is more lightweight than Prototype and it can do the same or even more. Also this library has lots of plugins and one of them is Boxy. Boxy is a flexible, Facebook-style dialog box for jQuery with support for dragging and size tweening. It differs from other [...]]]></description>
			<content:encoded><![CDATA[<p>I really enjoy <a href="http://jquery.com/">jQuery</a> and its capabilities. It is more lightweight than Prototype and it can do the same or even more. Also this library has lots of plugins and one of them is <a href="http://plugins.jquery.com/project/boxy">Boxy</a>. Boxy is a flexible, Facebook-style dialog box for <a href="http://jquery.com/">jQuery</a> with support for dragging and size tweening. It differs from other overlays I&#8217;ve seen by providing an object interface to control dialogs after they&#8217;ve been created. And for simple usage scenarios, boxy also provides a <a href="http://plugins.jquery.com/">jQuery plugin</a> for automatically hooking up links and forms, as well as an ask() helper for presenting multiple choices to the user.</p>
<p>Here&#8217;s an example, taken from feedback (contact us) form:<br />
<img class="aligncenter size-full wp-image-103" title="example" src="http://www.varnagiris.net/wp-content/uploads/2009/04/example.png" alt="example" width="362" height="333" /><span id="more-102"></span></p>
<p>Lets start coding. First of all, we need to have a link. When we click it, it will create boxy window.<br />
<code>&lt;a href="#" class="contact_us"&gt;Contact us&lt;/a&gt;</code></p>
<p>Short javascript which do everything: handle contact us link click, creates boxy window, handle form submit, post form using ajax and set the respond to boxy content.</p>
<pre><code>
$(function() {
    /* set global variable for boxy window */
    var contactBoxy = null;
    /* what to do when click on contact us link */
    $('.contact_us').click(function(){
        var boxy_content;
        boxy_content += "&lt;div style=\"width:300px; height:300px\"&gt;&lt;form id=\"feedback\"&gt;";
        boxy_content += "&lt;p&gt;Subject&lt;br /&gt;&lt;input type=\"text\" name=\"subject\" id=\"subject\" size=\"41\" /&gt;&lt;/p&gt;&lt;p&gt;Your name and/or email:&lt;br /&gt;&lt;input type=\"text\" name=\"your_email\" size=\"41\" /&gt;&lt;/p&gt;&lt;p&gt;Comment:&lt;br /&gt;&lt;textarea name=\"comment\" id=\"comment\" cols=\"39\" rows=\"5\"&gt;&lt;/textarea&gt;&lt;/p&gt;&lt;br /&gt;&lt;input type=\"submit\" name=\"submit\" value=\"Send &gt;&gt;\" /&gt;";
        boxy_content += "&lt;/form&gt;&lt;/div&gt;";
        contactBoxy = new Boxy(boxy_content, {
            title: "Send feedback",
            draggable: false,
            modal: true,
            behaviours: function(c) {
                c.find('#feedback').submit(function() {
                    Boxy.get(this).setContent("&lt;div style=\"width: 300px; height: 300px\"&gt;Sending...&lt;/div&gt;");
                    // submit form by ajax using post and send 3 values: subject, your_email, comment
                    $.post("feedback.php", { subject: c.find("input[name='subject']").val(), your_email: c.find("input[name='your_email']").val(), comment: c.find("#comment").val()},
                    function(data){
                        /*set boxy content to data from ajax call back*/
                        contactBoxy.setContent("&lt;div style=\"width: 300px; height: 300px\"&gt;"+data+"&lt;/div&gt;");
                    });
                    return false;
                });
            }
        });
        return false;
    });
});
</code></pre>
<p>So thats all. I believe you will be able to create feedback.php your self. And <a href="http://www.varnagiris.net/wp-content/examples/boxy_feedback/">here is the live demo</a> of this feedback (a.k.a contact us) form</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2009/04/11/ajax-feedback-form-using-jquery-boxy-plugin/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>New template</title>
		<link>http://www.varnagiris.net/2009/03/04/new-template/</link>
		<comments>http://www.varnagiris.net/2009/03/04/new-template/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 11:03:14 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/?p=71</guid>
		<description><![CDATA[If you are here not for the first time, you can see the new page template. Because the old one was too old and did not supported new wordpress functions, I decided to use this simple and lite plainscape theme. I hope everybody enjoy it as I do.]]></description>
			<content:encoded><![CDATA[<p>If you are here not for the first time, you can see the new page template. Because the old one was too old and did not supported new wordpress functions, I decided to use this simple and lite <a href="http://srinig.com/wordpress/themes/plainscape/">plainscape</a> theme. I hope everybody enjoy it as I do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2009/03/04/new-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change content using AJAX with FadeIn FadeOut effect</title>
		<link>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/</link>
		<comments>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 16:34:38 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/?p=60</guid>
		<description><![CDATA[Here you will find how to do such a trick: when somebody clicks the button, the old content fades out and then the new fades in. To do this I used jQuery witch is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. [...]]]></description>
			<content:encoded><![CDATA[<p>Here you will find how to do such a trick: when somebody clicks the button, the old content fades out and then the new fades in.<br />
To do this I used <a href="http://jquery.com/">jQuery</a> witch is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.<br />
<span id="more-60"></span><br />
The java script code is quite short and easy:</p>
<pre>
<code>
function refreshContent() {
  $("#content").fadeOut("slow", function(){
    $("#content").load("getrandomcontent.php",false, function() {
      $("#content").fadeIn("slow");
    });
  })
  return false;
}
</code>
</pre>
<p>Now you can use this function for a link<br />
<code>&lt;a href="#" onclick="return refreshContent();"&gt;Refresh&lt;/a&gt;</code><br />
When you click it, the content in <strong>div</strong> element with an id <em>&#8220;content&#8221;</em> will be changed. getrandomcontent.php is used to get random content.</p>
<p><a href="http://www.varnagiris.net/wp-content/examples/ajax_fade/">Check our demo</a>.</p>
<p><em>If this post helped you to solve your problem, please donate me. Donation button can be found on the right side of the page.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Moving MySQL data from 4.0 to 5.x</title>
		<link>http://www.varnagiris.net/2007/12/03/moving-mysql-data-from-40-to-5x/</link>
		<comments>http://www.varnagiris.net/2007/12/03/moving-mysql-data-from-40-to-5x/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 13:24:55 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2007/12/03/moving-mysql-data-from-40-to-5x/</guid>
		<description><![CDATA[I needed to move data from one database to another. The source DB was MySQL 4.0 and the destination was MySQL 5.1. And all the problems was with UTF-8 symbols. I couldn&#8217;t get it to work on MySQL 5.1. I search on the internet and figured out that MySQL 4.0 does not support UTF-8 and [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to move data from one database to another. The source DB was MySQL 4.0 and the destination was MySQL 5.1. And all the problems was with UTF-8 symbols. I couldn&#8217;t get it to work on MySQL 5.1. I search on the internet and figured out that MySQL 4.0 does not support UTF-8 and it is supported only from MySQL 4.1.<br />
You can store UTF-8 date on MySQL 4.0 but it&#8217;s not encoded using UTF-8. The data is encoded using the default encoding &#8216;Latin1&#8242;, so the only thing what you need is to make an export file and upload using PhpMyAdmin, but don&#8217;t forget to select that the data is encoded &#8216;Latin1&#8242; and not UTF-8.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2007/12/03/moving-mysql-data-from-40-to-5x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another FedEx class update</title>
		<link>http://www.varnagiris.net/2007/09/28/another-fedex-class-update/</link>
		<comments>http://www.varnagiris.net/2007/09/28/another-fedex-class-update/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 20:09:39 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[FedEx]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2007/09/28/another-fedex-class-update/</guid>
		<description><![CDATA[FedEx supports only 150 pound per package, so if you are trying to calculate rates for package which weight more than 150 you get an error. The fix was made and now PackageCount is automatically counted by given weight. You can download updated FedEx class from this post.]]></description>
			<content:encoded><![CDATA[<p>FedEx supports only 150 pound per package, so if you are trying to calculate rates for package which weight more than 150 you get an error. The fix was made and now PackageCount is automatically counted by given weight.</p>
<p>You can download updated FedEx class from this <a href="http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/">post</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2007/09/28/another-fedex-class-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: FedEx shipping rates calculator updated</title>
		<link>http://www.varnagiris.net/2007/08/31/php-fedex-shipping-rates-calculator-updated/</link>
		<comments>http://www.varnagiris.net/2007/08/31/php-fedex-shipping-rates-calculator-updated/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 10:22:56 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[FedEx]]></category>
		<category><![CDATA[rates]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2007/08/31/php-fedex-shipping-rates-calculator-updated/</guid>
		<description><![CDATA[One user was using my FedEx class and could not get rates for Ground service. I have just figured out what was the problem. First of all Ground and Home delivery are ground services and you must set Carrier code to FDXG. $fedex->setCarrierCode("FDXG"); After this I found few bugs witch I fixed and now you [...]]]></description>
			<content:encoded><![CDATA[<p>One user was using my FedEx class and could not get rates for Ground service. I have just figured out what was the problem. First of all Ground and Home delivery are ground services and you must set Carrier code to FDXG.</p>
<pre><code>$fedex->setCarrierCode("FDXG");</code></pre>
<p>After this I found few bugs witch I fixed and now you can download updated FedEx class from <a href="http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/">this post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2007/08/31/php-fedex-shipping-rates-calculator-updated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>406 Not Acceptable error</title>
		<link>http://www.varnagiris.net/2007/07/03/406-not-acceptable-error/</link>
		<comments>http://www.varnagiris.net/2007/07/03/406-not-acceptable-error/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 10:59:51 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[406]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2007/07/03/406-not-acceptable-error/</guid>
		<description><![CDATA[This is an error I got today: 406 Not Acceptable An appropriate representation of the requested resource /index.php could not be found on this server. I saw it for the first time and tried to find out where’s the problem. And the problem was in Apache mod_security. I have disabled mod_security specific to resolve the [...]]]></description>
			<content:encoded><![CDATA[<p>This is an error I got today:</p>
<blockquote><p>406 Not Acceptable<br />
An appropriate representation of the requested resource /index.php could not be found on this server.</p></blockquote>
<p>I saw it for the first time and tried to find out where’s the problem. And the problem was in Apache mod_security. I have disabled mod_security specific to resolve the 406 errors. Sometimes mod_security rules are too strict for some web applications.</p>
<p>In order to disable mod_security add this line to .htaccess file: SecFilterEngine Off</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2007/07/03/406-not-acceptable-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Godaddy promo code &#124; renew .NET</title>
		<link>http://www.varnagiris.net/2007/07/03/godaddy-promo-code-renew-net/</link>
		<comments>http://www.varnagiris.net/2007/07/03/godaddy-promo-code-renew-net/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 10:57:39 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[renew]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2007/07/03/godaddy-promo-code-renew-net/</guid>
		<description><![CDATA[My anekdotai.net domain expiration was going to the end so today i decided to renew it. And first of all I was looking for godaddy promo codes. Most of them were not working or already expired but there are two codes still working: $6.99 .NET domains!(Register or Renew). gdr0709a Renew your domain! Enjoy special savings [...]]]></description>
			<content:encoded><![CDATA[<p>My anekdotai.net domain expiration was going to the end so today i decided to renew it. And first of all I was looking for godaddy promo codes. Most of them were not working or already expired but there are two codes still working:</p>
<p><em>$6.99 .NET domains!(Register or Renew).</em><br />
<strong>gdr0709a</strong></p>
<p><em>Renew your domain! Enjoy special savings for .COM, .NET, .ORG, .INFO, .MOBI and .TV renewals. $7.50</em><br />
<strong>gdbb776</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2007/07/03/godaddy-promo-code-renew-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: FedEx shipping rates calculator</title>
		<link>http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/</link>
		<comments>http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 06:49:38 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[FedEx]]></category>
		<category><![CDATA[rates]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/</guid>
		<description><![CDATA[FedEx Ship Manager (FSM) Direct was designed to allow customers to connect directly to the FedEx back end systems using their own communications protocol. Welcome to FSM Direct! You can compose FedEx XML Transactions to interface between your e-commerce application and the FedEx server and vice versa. This solution is applicable only to those customers [...]]]></description>
			<content:encoded><![CDATA[<p><strong>FedEx</strong> Ship Manager (FSM) Direct was designed to allow customers to connect directly to the FedEx back end systems using their own communications protocol. Welcome to FSM Direct!<br />
You can compose FedEx XML Transactions to interface between your <strong>e-commerce</strong> application and the FedEx server and vice versa.<br />
This solution is applicable only to those customers that have the development resources and knowledge to develop their own FedEx interface.</p>
<p><em>Before you begin:</em><br />
FSM Direct Site Registration: To register in the FSM Direct program, go to <a href="http://www.fedex.com/us/solutions/wis/">http://www.fedex.com/us/solutions/wis/</a>. Register and complete the brief registration form.</p>
<p>Steps for developing your own communications protocol and integrating it into your application are listed below.</p>
<ul>
<li>Read and accept the FedEx Ship Manager Direct license agreement.</li>
<li>Review the FedEx Direct Documentation: Determine if this alternative or FedEx API is appropriate for your application.</li>
<li>Develop your application.</li>
<li>Send an email to websupport@fedex.com. Request to be set up for testing. Attach FedEx Express and/or FedEx Ground account number(s).</li>
<li>Test your application.</li>
</ul>
<p>All documentation can be found here:</p>
<p>http://www.fedex.com/us/solutions/wis/pdf/fsm_directmanual.pdf</p>
<p>http://www.fedex.com/us/solutions/wis/pdf/xml_transguide.pdf</p>
<p>Here&#8217;s more about this class<br />
<span id="more-36"></span></p>
<p>How to use this Fedex rates class:</p>
<pre>
<code>
    $fedex = new Fedex;
    $fedex->setServer("https://gatewaybeta.fedex.com/GatewayDC");
    $fedex->setAccountNumber(123123123);
    $fedex->setMeterNumber(12312312);
    $fedex->setCarrierCode("FDXE");
    $fedex->setDropoffType("REGULARPICKUP");
    $fedex->setService($service, $serviceName);
    $fedex->setPackaging("YOURPACKAGING");
    $fedex->setWeightUnits("LBS");
    $fedex->setWeight(17);
    $fedex->setOriginStateOrProvinceCode("OH");
    $fedex->setOriginPostalCode(44333);
    $fedex->setOriginCountryCode("US");
    $fedex->setDestStateOrProvinceCode("CA");
    $fedex->setDestPostalCode(90210);
    $fedex->setDestCountryCode("US");
    $fedex->setPayorType("SENDER");

    $price = $fedex->getPrice();
</code></pre>
<p>All available variables can be found here: http://www.fedex.com/us/solutions/wis/pdf/xml_transguide.pdf (FDXRateRequest)</p>
<p>Possible Fedex answer:</p>
<pre>
<code>
fedex Object
(
    [server] => https://gatewaybeta.fedex.com/GatewayDC
    [accountNumber] => 123123123
    [meterNumber] => 12312312
    [carrierCode] => FDXE
    [dropoffType] => REGULARPICKUP
    [service] => STANDARDOVERNIGHT
    [serviceName] => FedEx Standard Overnight
    [packaging] => YOURPACKAGING
    [weightUnits] => LBS
    [weight] => 17
    [originStateOrProvinceCode] => OH
    [originPostalCode] => 44333
    [originCountryCode] => US
    [destStateOrProvinceCode] => CA
    [destPostalCode] => 90210
    [destCountryCode] => US
    [payorType] => SENDER
    [price] => price Object
        (
            [service] => FedEx Standard Overnight
            [rate] => 86.37
            [response] => Array
                (
                  ...//Here is full xml response
                )
        )
)
</code>
</pre>
<p><a id="p37" href="http://www.varnagiris.net/wp-content/uploads/2006/06/Fedex.zip" title="Fedex rates" onclick="javascript: pageTracker._trackPageview('/downloads/FedEx');">Click here to download FedEx shipping rates calculator class</a></p>
<p>Please make a donation of <strong>1$</strong> if you find our software useful and want to support the continued development.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="algirdas@varnagiris.net"/>
<input type="hidden" name="item_name" value="FedEx Rates Class"/>
<input type="hidden" name="amount" value="1.00"/>
<input type="hidden" name="buyer_credit_promo_code" value=""/>
<input type="hidden" name="buyer_credit_product_category" value=""/>
<input type="hidden" name="buyer_credit_shipping_method" value=""/>
<input type="hidden" name="buyer_credit_user_address_change" value=""/>
<input type="hidden" name="no_shipping" value="0"/>
<input type="hidden" name="no_note" value="1"/>
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="tax" value="0"/>
<input type="hidden" name="lc" value="US"/>
<input type="hidden" name="bn" value="PP-DonationsBF"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border:0px" onclick="javascript: pageTracker._trackPageview('/goal/donate.html');" />
<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" style="border:0px" /><br />
</form>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>PHP: USPS rates calculator</title>
		<link>http://www.varnagiris.net/2006/05/04/php-usps-rates-calculator/</link>
		<comments>http://www.varnagiris.net/2006/05/04/php-usps-rates-calculator/#comments</comments>
		<pubDate>Thu, 04 May 2006 14:10:02 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[rates]]></category>
		<category><![CDATA[USPS]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/2006/05/04/php-usps-rates-calculator/</guid>
		<description><![CDATA[The USPS Web Tools allow developers of web-based and shrink-wrapped applications access to the on-line services of the United States Postal Service (USPS). They provide easy access to shipping information and services for your customers. Your customers can utilize the functions provided by the USPS without ever leaving your web site. Once the Web Tools [...]]]></description>
			<content:encoded><![CDATA[<p>The USPS Web Tools allow developers of web-based and shrink-wrapped applications access to the on-line services of the United States Postal Service (USPS).  They provide easy access to shipping information and services for your customers. Your customers can utilize the functions provided by the USPS without ever leaving your web site.  Once the Web Tools are integrated, your server communicates through the USPS Web Tools server over HTTP using XML (eXtensible Markup Language).</p>
<p> <strong>Rates Calculators</strong></p>
<p> Everything in details can be found here:<br />
 <a href="http://www.usps.com/webtools/rate.htm">http://www.usps.com/webtools/rate.htm</a></p>
<p> First steps:</p>
<ol>
<li>Register online (You will get your own user name)</li>
<li>Test this script (You can use only test data)</li>
<li>Contact ICCC and go live.</li>
</ol>
<p>    When you have completed your testing, email the USPS Internet Customer Care  Center (ICCC).  They will switch your profile to allow you access to the  production server and will provide you with the production URL.<span id="more-34"></span></p>
<p>    <strong>Domestic and International Rates</strong></p>
<p>    <em>Domestic rates</em></p>
<p>    Test 1:</p>
<pre>
<code>
    $usps = new USPS;
    $usps->setServer("http://testing.shippingapis.com/ShippingAPITest.dll");
    $usps->setUserName("?????????");
    $usps->setService("PRIORITY");
    $usps->setDestZip("20008");
    $usps->setOrigZip("10022");
    $usps->setWeight(10, 5);
    $usps->setContainer("Flat Rate Box");
    $usps->setCountry("USA");
    $price = $usps->getPrice();
</code>
</pre>
<p>    Response 1:</p>
<pre>
<code>
    usps Object
    (
        [server] => http://testing.shippingapis.com/ShippingAPITest.dll
        [user] => ???????????
        [pass] =>
        [service] => PRIORITY
        [dest_zip] => 20008
        [orig_zip] => 10022
        [pounds] => 10
        [ounces] => 5
        [container] => Flat Rate Box
        [size] => REGULAR
        [machinable] =>
        [country] => USA
        [zone] => 3
        [list] => Array
            (
                [0] => price Object
                    (
                        [mailservice] => "Priority Mail Flat Rate Box (11.25'' x 8.75'' x 6'')"
                        [rate] => 7.70
                    )
                [1] => price Object
                    (
                        [mailservice] => "Priority Mail Flat Rate Box (14''x 12'' x 3.5'')"
                        [rate] => 7.70
                    )
            )
    )
</code>
</pre>
<p>    Test 2:</p>
<pre>
<code>
    $usps = new USPS;
    $usps->setServer("http://testing.shippingapis.com/ShippingAPITest.dll");
    $usps->setUserName("?????????");
    $usps->setService("All");
    $usps->setDestZip("20008");
    $usps->setOrigZip("10022");
    $usps->setWeight(10, 5);
    $usps->setContainer("Flat Rate Box");
    $usps->setCountry("USA");
    $usps->setMachinable("true");
    $usps->setSize("LARGE");
    $price = $usps->getPrice();
</code>
</pre>
<p>    Response 2:</p>
<pre>
<code>
    usps Object
    (
        [server] => http://testing.shippingapis.com/ShippingAPITest.dll
        [user] => ???????????
        [pass] =>
        [service] => All
        [dest_zip] => 20008
        [orig_zip] => 10022
        [pounds] => 10
        [ounces] => 5
        [container] => Flat Rate Box
        [size] => LARGE
        [machinable] => true
        [country] => USA
        [zone] => 3
        [list] => Array
            (
                [0] => price Object
                    (
                        [mailservice] => "Express Mail to PO Addressee"
                        [rate] => 39.20
                    )
                [1] => price Object
                    (
                        [mailservice] => "Priority Mail"
                        [rate] => 8.95
                    )
                [2] => price Object
                    (
                        [mailservice] => "Parcel Post"
                        [rate] => 7.80
                    )
                [3] => price Object
                    (
                        [mailservice] => "Bound Printed Matter"
                        [rate] => 3.53
                    )
                [4] => price Object
                    (
                        [mailservice] => "Media Mail"
                        [rate] => 5.14
                    )
                [5] => price Object
                    (
                        [mailservice] => "Library Mail"
                        [rate] => 4.91
                    )
            )
    )
</code>
</pre>
<p>    <em>International rates:</em></p>
<p>    Test 1:</p>
<pre>
<code>
    $usps = new USPS;
    $usps->setServer("http://testing.shippingapis.com/ShippingAPITest.dll");
    $usps->setUserName("??????????");
    $usps->setWeight(2, 0);
    $usps->setCountry("Albania");
    $price = $usps->getPrice();
</code>
</pre>
<p>    Response 1:</p>
<pre>
<code>
    usps Object
    (
        [server] => http://testing.shippingapis.com/ShippingAPITest.dll
        [user] => ?????????
        [pass] =>
        [service] =>
        [dest_zip] =>
        [orig_zip] =>
        [pounds] => 2
        [ounces] => 0
        [container] => None
        [size] => REGULAR
        [machinable] =>
        [country] => Albania
        [list] => Array
            (
                [0] => intprice Object
                    (
                        [id] => 0
                        [rate] => 87
                        [pounds] => 2
                        [ounces] => 0
                        [mailtype] => "Package"
                        [country] => "ALBANIA"
                        [svccommitments] => "See Service Guide"
                        [svcdescription] => "Global Express Guaranteed (GXG) Document Service"
                        [maxdimensions] => "Max. length 46'', depth 35'', height 46'' and max. girth 108''"
                        [maxweight] => 22
                    )
                [1] => intprice Object
                    (
                        [id] => 1
                        [rate] => 96
                        [pounds] => 2
                        [ounces] => 0
                        [mailtype] => "Package"
                        [country] => "ALBANIA"
                        [svccommitments] => "See Service Guide"
                        [svcdescription] => "Global Express Guaranteed (GXG) Non-Document Service"
                        [maxdimensions] => "Max. length 46'', depth 35'', height 46'' and max. girth 108''"
                        [maxweight] => 22
                    )
            )
    )
</code>
</pre>
<p>    Possible errors:</p>
<pre>
<code>
    usps Object
    (
        [server] => http://testing.shippingapis.com/ShippingAPITest.dll
        [user] => ???????????
        [pass] =>
        [service] => Alll
        [dest_zip] => 20008
        [orig_zip] => 10022
        [pounds] => 10
        [ounces] => 5
        [container] => Flat Rate Box
        [size] => LARGE
        [machinable] => true
        [country] => USA
        [error] => error Object
            (
                [number] => -2147219487
                [source] => Rate_Respond;SOLServerRatesTest.RateV2_Respond
                [description] => "Invalid value for package size."
                [helpcontext] => 1000440
                [helpfile] =>
            )
    )
</code>
</pre>
<p>Downlod this freeware PHP script: <a id="p35" href="http://www.varnagiris.net/wp-content/uploads/2006/05/USPS.ZIP" onclick="javascript: pageTracker._trackPageview('/downloads/USPS');">USPS rates calculator v1.2</a></p>
<p>Please make a donation of <strong>1$</strong> if you find our software useful and want to support the continued development.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="algirdas@varnagiris.net"/>
<input type="hidden" name="item_name" value="USPS Rates Class"/>
<input type="hidden" name="amount" value="1.00"/>
<input type="hidden" name="buyer_credit_promo_code" value=""/>
<input type="hidden" name="buyer_credit_product_category" value=""/>
<input type="hidden" name="buyer_credit_shipping_method" value=""/>
<input type="hidden" name="buyer_credit_user_address_change" value=""/>
<input type="hidden" name="no_shipping" value="0"/>
<input type="hidden" name="no_note" value="1"/>
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="tax" value="0"/>
<input type="hidden" name="lc" value="US"/>
<input type="hidden" name="bn" value="PP-DonationsBF"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border:0px" onclick="javascript: pageTracker._trackPageview('/goal/donate.html');" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" style="border:0px" /><br />
</form>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2006/05/04/php-usps-rates-calculator/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
	</channel>
</rss>
