<?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>crimulus-dot-com &#187; How-To</title>
	<atom:link href="http://www.crimulus.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crimulus.com</link>
	<description>A blog; ineptly autobiographical</description>
	<lastBuildDate>Sun, 29 Jan 2012 10:20:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP Random String and POST Form Generator</title>
		<link>http://www.crimulus.com/2011/07/08/php-random-string-and-post-form-generator/</link>
		<comments>http://www.crimulus.com/2011/07/08/php-random-string-and-post-form-generator/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 15:17:37 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[php random form generator]]></category>
		<category><![CDATA[php random string generator]]></category>
		<category><![CDATA[random POST form]]></category>
		<category><![CDATA[random string]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1387</guid>
		<description><![CDATA[Just a little snippet of sample code.  Sometimes you just need a random string generator, and on top of that, a random form to test a page. Maybe I&#8217;m just keeping this for my own future reference, but maybe someone else out there could use it too.  The function generates a string containing numbers and [...]]]></description>
			<content:encoded><![CDATA[<p>Just a little snippet of sample code.  Sometimes you just need a random string generator, and on top of that, a random form to test a page.</p>
<p>Maybe I&#8217;m just keeping this for my own future reference, but maybe someone else out there could use it too.  <img src='http://www.crimulus.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The function generates a string containing numbers and letters only (it&#8217;s easily customizable to contain other chars).  The form just creates inputs with random names from the string generator and random values from the string generator.</p>
<p><code><br />
function randomString() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';<br />
&nbsp; &nbsp; &nbsp; &nbsp; for ($i=0; $i&lt;rand(10,20); $i++) { $string .= $chars[rand(0,strlen($chars))]; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $string;<br />
}</p>
<p>?&gt;&lt;form action=&quot;&quot; method=&quot;POST&quot;&gt;&lt;?php<br />
&nbsp; &nbsp; &nbsp; &nbsp; for ($i=1; $i&lt;=rand(5,10); $i++) { ?&gt;&lt;p /&gt;&lt;input name=&quot;&lt;?php echo randomString(); ?&gt;&quot; value=&quot;&lt;?php echo randomString(); ?&gt;&quot; /&gt;&lt;?php }<br />
&nbsp; &nbsp; &nbsp; &nbsp; ?&gt;&lt;p /&gt;&lt;input type=&quot;submit&quot; /&gt;&lt;?php<br />
?&gt;&lt;/form&gt;&lt;?php<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2011/07/08/php-random-string-and-post-form-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to process PayPal Express Checkout for third party merchants</title>
		<link>http://www.crimulus.com/2011/05/18/how-to-process-paypal-express-checkout-for-third-party-merchants/</link>
		<comments>http://www.crimulus.com/2011/05/18/how-to-process-paypal-express-checkout-for-third-party-merchants/#comments</comments>
		<pubDate>Wed, 18 May 2011 19:11:53 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Electronic commerce]]></category>
		<category><![CDATA[google-search-query-nuance tweaking]]></category>
		<category><![CDATA[Payment systems]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[paypal express checkout for third party merchants]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1379</guid>
		<description><![CDATA[This is a very simple one, but one that can take a lot of google-search-query-nuance tweaking to find. It&#8217;s easy to find the documentation to do PayPal Express Checkout, but to find that one little field where you send an alternate user as the recipient of the payments, well that&#8217;s downright impossible.  It is not [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simple one, but one that can take a lot of google-search-query-nuance tweaking to find.</p>
<p>It&#8217;s easy to find the documentation to do PayPal Express Checkout, but to find that one little field where you send an alternate user as the recipient of the payments, well that&#8217;s downright impossible.  It is not in the docs (at least not as of this writing 5-18-2011).</p>
<p>How simple is it? Very &#8212; the variable is &#8220;SUBJECT&#8221;</p>
<p>Yes, you specify an alternate &#8220;SUBJECT&#8221; of the transaction.</p>
<p>Normally your SetExpressCheckout request looks something like:</p>
<pre>METHOD=&lt;method_name&gt;&amp;VERSION=&lt;version&gt;&amp;PWD=&lt;API_Password&gt;&amp;USER=&lt;API_UserName&gt;&amp;SIGNATURE=&lt;API_Signature&gt;&amp;...</pre>
<p>Now it will look like this:</p>
<pre>METHOD=&lt;method_name&gt;&amp;VERSION=&lt;version&gt;&amp;PWD=&lt;API_Password&gt;&amp;USER=&lt;API_UserName&gt;&amp;SIGNATURE=&lt;API_Signature&gt;&amp;SUBJECT=&lt;Payee_PayPal_Account&gt;...</pre>
<p>Payee_PayPal_Account is the email address/username the user uses to log in.</p>
<p>Hope this helps!  Took us valuable time to find &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2011/05/18/how-to-process-paypal-express-checkout-for-third-party-merchants/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux BASH Script: Search current directory for files containing text</title>
		<link>http://www.crimulus.com/2010/12/29/linux-bash-script-search-current-directory-for-files-containing-text/</link>
		<comments>http://www.crimulus.com/2010/12/29/linux-bash-script-search-current-directory-for-files-containing-text/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 22:20:45 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[linux directory text search]]></category>
		<category><![CDATA[linux multi-file grep]]></category>
		<category><![CDATA[linux search all files for text]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1306</guid>
		<description><![CDATA[I have written a simple BASH script to scan the current directory for all files containing certain text. I use this all the time as I don&#8217;t know of a better Linux alternative, but it&#8217;s simple enough.  Just put save it as &#8220;/sbin/find-file-with&#8221; with executable permissions, and use it like so: find-file-with sometext If a [...]]]></description>
			<content:encoded><![CDATA[<p>I have written a simple BASH script to scan the current directory for all files containing certain text.</p>
<p>I use this all the time as I don&#8217;t know of a better Linux alternative, but it&#8217;s simple enough.  Just put save it as &#8220;/sbin/find-file-with&#8221; with executable permissions, and use it like so:</p>
<p><code>find-file-with sometext</code></p>
<p>If a matching file is found, it will print the full path of the file as well as the lines matching using grep (so the &#8220;some text&#8221; is passed directly into grep if you need help on how to vary your search)</p>
<p>Obviously some advancements can be performed, but without this script, I always just type (each time):</p>
<p><code>for I in `find ./*` ; do echo $I; cat $I | grep sometext; done</code></p>
<p>This script just keeps me from filling the screen with directory errors and unmatching files.</p>
<p>As a side note, if you want to include quotes (as in grep &#8220;some text&#8221;), you need to escape them:</p>
<p><code>find-file-with \"some text\"</code></p>
<p>Hope others find it useful &#8230; but the main reason it is here is so I have an online backup.  <img src='http://www.crimulus.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<pre><code>#!/bin/sh
echo "";
for I in `find ./*` ; do
        if [ ! -d "$I" ] ; then
                if [ -e "$I" ] ; then
                        CMD="cat $I | grep $* | wc -c";
                        C=`eval $CMD`
                        if [ $C -gt 0 ] ; then
                                </code>echo "\033[1m[ "$I" ]\033[0m"
<code>                                cat $I | grep $* -n --color=auto;</code><code>
                                echo ""</code>
<code>                        fi;
                fi;
        fi;
done;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/12/29/linux-bash-script-search-current-directory-for-files-containing-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3 Multisite and Base URL Forwarding (www subdomain requirements)</title>
		<link>http://www.crimulus.com/2010/12/29/wordpress-3-multisite-and-base-url-forwarding-www-subdomain-requirements/</link>
		<comments>http://www.crimulus.com/2010/12/29/wordpress-3-multisite-and-base-url-forwarding-www-subdomain-requirements/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 22:11:47 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[avoid redirection to wp-signup.php]]></category>
		<category><![CDATA[subdomain redirection in wordpress]]></category>
		<category><![CDATA[wordpress 3 multisite]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1301</guid>
		<description><![CDATA[One of the annoying quirks about WordPress 3 multisite is that it does not properly redirect or display when users connect to your domain without using the &#8220;www.&#8221; subdomain.  At least, this is the case for me as I&#8217;m using a &#8220;hack&#8221; to use multiple domains in the multisite install. This post is more for [...]]]></description>
			<content:encoded><![CDATA[<p>One of the annoying quirks about WordPress 3 multisite is that it does not properly redirect or display when users connect to your domain without using the &#8220;www.&#8221; subdomain.  At least, this is the case for me as I&#8217;m using a &#8220;hack&#8221; to use multiple domains in the multisite install.</p>
<p>This post is more for my own future reference, because seriously, what keywords would anyone use to find this?  Anyway, the solution is just to edit this file:</p>
<p><code>/wp-includes/ms-settings.php</code></p>
<p>Find the if clause containing &#8220;wp-signup.php&#8221; &#8212; the phrase only exists in the file in one place, so just do a text search.</p>
<p>It is actually nested in two if clauses.</p>
<p>Simply change:</p>
<p><code>if (defined('NOBLOGREDIRECT')) {</code></p>
<p>to</p>
<p><code>if ($_SERVER['SERVER_NAME'] == "mydomain.com") {<br />
$destination = 'http://www.mydomain.com'.$_SERVER['REQUEST_URI'];<br />
} else if (defined('NOBLOGREDIRECT')) {</code></p>
<p>You can obviously do other variations if you need more advanced redirection, but this is where the magic happens.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/12/29/wordpress-3-multisite-and-base-url-forwarding-www-subdomain-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Linux SSH to Remote Server, execute a command and stay logged in</title>
		<link>http://www.crimulus.com/2010/12/14/howto-linux-ssh-to-remote-server-execute-a-command-and-stay-logged-in/</link>
		<comments>http://www.crimulus.com/2010/12/14/howto-linux-ssh-to-remote-server-execute-a-command-and-stay-logged-in/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 17:10:52 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[remote ssh commands]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh execute command and stay logged in]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1289</guid>
		<description><![CDATA[One of the shortcuts I always keep in my gnome taskbar is a link to a gnome-terminal with 3 tabs, each in the websites base directory of my web development server. It took my quite a long time to figure out how to get it to change to that directory then stay logged in, even [...]]]></description>
			<content:encoded><![CDATA[<p>One of the shortcuts I always keep in my gnome taskbar is a link to a  gnome-terminal with 3 tabs, each in the websites base directory of my  web development server.</p>
<p>It took my quite a long time to figure out  how to get it to change to that directory then stay logged in, even  though it is rather simple.  It also took my a long time again recently  because I reinstalled without backing that up.  So, this post is mainly  so I don&#8217;t have to do that again, but maybe it will help others too.</p>
<p>The  trick is to make SSH behave like a terminal (with the oft-overlooked -t  flag), then to execute a login bash shell using normal SSH command  execution.</p>
<p>So:</p>
<p>ssh -t &#8216;cd /path/to/go/to; bash -l&#8217;</p>
<p>So for me, my shortcut in the gnome taskbar is</p>
<p>gnome-terminal &#8211;tab -e &#8220;ssh -t &#8216;cd /path; bash -l&#8217;&#8221; &#8211;tab -e &#8220;ssh -t &#8216;cd /path; bash -l&#8217;&#8221; &#8211;tab -e &#8220;ssh -t &#8216;cd /path; bash -l&#8217;&#8221;</p>
<p>There &#8212; saved myself (and you) some time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/12/14/howto-linux-ssh-to-remote-server-execute-a-command-and-stay-logged-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3 Auto-Update &amp; Unable To Create Directory wp-content/upgrade/wordpress-3.tmp</title>
		<link>http://www.crimulus.com/2010/12/06/wordpress-3-auto-update-unable-to-create-directory-wp-contentupgradewordpress-3-tmp/</link>
		<comments>http://www.crimulus.com/2010/12/06/wordpress-3-auto-update-unable-to-create-directory-wp-contentupgradewordpress-3-tmp/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:09:53 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[wordpress ftp upgrade fails]]></category>
		<category><![CDATA[Wordpress VSFTP unable to create directory wp-content upgrade wordpress-3.tmp]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1283</guid>
		<description><![CDATA[Many, many, many users have apparently been experiencing an issue with this in WordPress &#8212; for some reason their auto update doesn&#8217;t work anymore.  I use the word &#8220;anymore,&#8221; because, for some users, it never worked.  For you, the solution is this: change permissions on the &#60;install-dir&#62;/wp-content/upgrade/ directory to 777 (only that directory for very [...]]]></description>
			<content:encoded><![CDATA[<p>Many, many, many users have apparently been experiencing an issue with this in WordPress &#8212; for some reason their auto update doesn&#8217;t work anymore.  I use the word &#8220;anymore,&#8221; because, for some users, it never worked.  For you, the solution is this: change permissions on the &lt;install-dir&gt;/wp-content/upgrade/ directory to 777 (only that directory for very obvious security reasons).</p>
<p>For users like me, however, there is an equally stupid result, and that is that VSFTP apparently disabled all FTP write commands in new versions.  Are you running VSFTP and using FTP to do your WordPress upgrades?</p>
<p>Well just edit your /etc/vsftpd.conf (exact location may vary by distro) and uncomment the line:</p>
<p>#write_enable=YES</p>
<p>(Just remove the #, save, and restart VSFTP.)</p>
<p>This worked for me, and I just figured it out on my own.  Stupid, yes, but for those of use who have become search-engine-instant-success-addicts, impossible to find.  Hopefully not so for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/12/06/wordpress-3-auto-update-unable-to-create-directory-wp-contentupgradewordpress-3-tmp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Howto: Enable PCNTL in Ubuntu PHP installations</title>
		<link>http://www.crimulus.com/2010/07/30/howto-enable-pcntl-in-ubuntu-php-installations/</link>
		<comments>http://www.crimulus.com/2010/07/30/howto-enable-pcntl-in-ubuntu-php-installations/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 17:51:40 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pcntl]]></category>
		<category><![CDATA[pcntl on ubuntu]]></category>
		<category><![CDATA[pcntl_fork php5 ubuntu]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu lamp pcntl_fork]]></category>

		<guid isPermaLink="false">http://www.crimulus.com/?p=1203</guid>
		<description><![CDATA[PCNTL in PHP allows for some handy advanced &#8220;trickery&#8221; using the OS process functions inherent in Linux (*nix?).  I believe some features are available in Windows, but I know for certain that pcntl_fork() is not. Anyway, it is not enabled by default, so if you want to take advantage of the functions on your Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>PCNTL in PHP allows for some handy advanced &#8220;trickery&#8221; using the OS process functions inherent in Linux (*nix?).  I believe some features are available in Windows, but I know for certain that <a href="http://php.net/manual/en/function.pcntl-fork.php">pcntl_fork()</a> is not.</p>
<p>Anyway, it is not enabled by default, so if you want to take advantage of the functions on your Ubuntu LAMP server, you might spend hours searching the web for that magic aptitude command.  But, as far as I can tell, it doesn&#8217;t exist.</p>
<p>Luckily, I stumbled across <a href="http://ubuntuforums.org/showthread.php?t=549953">this article</a> on the Ubuntu forums, so I&#8217;m dedicating a post here with the hopes that other will find it more easily.</p>
<p>Please note that you&#8217;ll probably need build-essentials and a few other source compilation basics, but as long as you have that, the following code will get you what you want.</p>
<p>First, in your home directory:</p>
<pre dir="ltr">mkdir php
cd php
apt-get source php5
cd php5-(WHATEVER_RELEASE)/ext/pcntl
phpize
./configure
make
</pre>
<p>Then:</p>
<pre>cp modules/pcntl.so /usr/lib/php5/WHEVER_YOUR_SO_FILES_ARE/
echo "extension=pcntl.so" &gt; /etc/php5/conf.d/pcntl.ini
</pre>
<p>FYI: &#8220;make install&#8221; does not appear to put the files in the correct place.</p>
<p>Btw, please direct any thanks/praise to <a href="http://ubuntuforums.org/member.php?s=d1752fb7a07c097ec02e7c427ffb22ad&amp;u=117773">skout23</a> on the <a href="http://ubuntuforums.org/showpost.php?s=d1752fb7a07c097ec02e7c427ffb22ad&amp;p=5365169&amp;postcount=2">Ubuntu forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/07/30/howto-enable-pcntl-in-ubuntu-php-installations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>FedEx Shipping XML API Idiosyncrasies &#8212; the saga continues (PHP &amp; Soap envelopes)</title>
		<link>http://www.crimulus.com/2010/05/24/fedex-shipping-xml-api-idiosyncrasies-the-saga-continues-php-soap-envelopes/</link>
		<comments>http://www.crimulus.com/2010/05/24/fedex-shipping-xml-api-idiosyncrasies-the-saga-continues-php-soap-envelopes/#comments</comments>
		<pubDate>Mon, 24 May 2010 19:21:28 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[fedex xml api]]></category>
		<category><![CDATA[OSI protocols]]></category>
		<category><![CDATA[simplexml]]></category>
		<category><![CDATA[simplexml and fedex api response]]></category>
		<category><![CDATA[simplexml and namespaces]]></category>
		<category><![CDATA[simplexml and nesteded namespaces]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[V8 engine]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://www.coffeecuphalfmoons.com/?p=980</guid>
		<description><![CDATA[I am doing a fairly large implementation using the exposed APIs of all 4 major shippers.  I&#8217;ve posted a few notes on USPS, and I&#8217;ve been using UPS for so long it almost seems to make perfect sense. So, while I have to applaud FedEx for the granularity and versatility of the API they have [...]]]></description>
			<content:encoded><![CDATA[<p>I am doing a fairly large implementation using the exposed APIs of all 4 major shippers.  I&#8217;ve posted a few notes on USPS, and I&#8217;ve been using UPS for so long it almost seems to make perfect sense.</p>
<p>So, while I have to applaud FedEx for the granularity and versatility of the API they have exposed, it has caused me severe headaches due to the PHP SimpleXML issues it brings up with SOAP envelopes &#8212; particularly nested soap envelopes.</p>
<p>Long story short, the jist of this post is to help others deal with the responses they receive from the FedEx servers (if, like me, their pre-packaged methods do not implement tidily into your application structure).</p>
<p>Here is a sample response of a rate request (NOTE: this is a &#8220;Warning&#8221; response, only here for demo purposes):</p>
<pre><code>
   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;env:Body xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;v8:RateReply xmlns:v8="http://fedex.com/ws/rate/v8"&gt;
            &lt;v8:HighestSeverity&gt;WARNING&lt;/v8:HighestSeverity&gt;
            &lt;v8:Notifications&gt;
                &lt;v8:Severity&gt;WARNING&lt;/v8:Severity&gt;
                &lt;v8:Source&gt;crs&lt;/v8:Source&gt;
                &lt;v8:Code&gt;556&lt;/v8:Code&gt;
                &lt;v8:Message&gt;There are no valid services available. &lt;/v8:Message&gt;
                &lt;v8:LocalizedMessage&gt;There are no valid services available. &lt;/v8:LocalizedMessage&gt;
            &lt;/v8:Notifications&gt;
            &lt;v8:TransactionDetail xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
                &lt;v8:CustomerTransactionId&gt;TC05_Rate_Package_Groups_POS&lt;/v8:CustomerTransactionId&gt;
            &lt;/v8:TransactionDetail&gt;
            &lt;v8:Version xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
                &lt;v8:ServiceId&gt;crs&lt;/v8:ServiceId&gt;
                &lt;v8:Major&gt;8&lt;/v8:Major&gt;
                &lt;v8:Intermediate&gt;0&lt;/v8:Intermediate&gt;
                &lt;v8:Minor&gt;0&lt;/v8:Minor&gt;
            &lt;/v8:Version&gt;
        &lt;/v8:RateReply&gt;
    &lt;/env:Body&gt;
&lt;/soapenv:Envelope&gt;
    </code>
</pre>
<p>There are lots of ways you might envision accessing that precious &#8220;RateReply&#8221; tag, but to keep it simple and avoid inferences, you get to it like this:</p>
<p>$xml = simplexml_load_string ($xml_from_above);<br />
$xml->children(&#8216;http://schemas.xmlsoap.org/soap/envelope/&#8217;)->Body->children(&#8216;http://fedex.com/ws/rate/v8&#8242;)->RateReply;</p>
<p>I do suppose this is obvious enough, but believe me, the nuances that can throw it off can still cause you to inadvertently lose ridiculous amounts of time on it.</p>
<p>Furthermore, if you prefer to do direct PHP cURL XML calls (which you probably do given that you&#8217;re reading this), you&#8217;ll find that FedEx is not terribly interested in your type of programmer.  To find a simple sample XML call, you&#8217;ll have a tough time (although I managed to find it in the WSDL downloadable ZIP).  However, this is a very basic call.  To add additional data (such as the exotic field that apparently no one would ever think to use &#8212; &#8220;InsuredValue&#8221;) &#8212; this field has the form (EXACTLY, stuff in brackets is what can be changed) &#8220;&lt;InsuredValue&gt;&lt;Currency&gt;[currencytype]&lt;/Currency&gt;&lt;Amount&gt;[float]&lt;/Amount&gt;&lt;/InsuredValue&gt;&#8221;</p>
<p>The &#8220;InsuredValue&#8221; node/field must go immediately before the &#8220;Weight&#8221; node in the &#8220;RequestedPackageLineItems&#8221; node.  (This of course reference FedEx API v8 &#8212; things may be different in future releases.) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/05/24/fedex-shipping-xml-api-idiosyncrasies-the-saga-continues-php-soap-envelopes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>USPS Shipping XML API Testing Idiosyncrasies</title>
		<link>http://www.crimulus.com/2010/05/20/usps-shipping-xml-api-testing-idiosyncrasies/</link>
		<comments>http://www.crimulus.com/2010/05/20/usps-shipping-xml-api-testing-idiosyncrasies/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:55:49 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[e - commerce]]></category>
		<category><![CDATA[exact values]]></category>
		<category><![CDATA[fedex]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[math teacher]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[package dimensions]]></category>
		<category><![CDATA[rate request]]></category>
		<category><![CDATA[RateV]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[United States Postal Service]]></category>
		<category><![CDATA[usps]]></category>
		<category><![CDATA[valid zip code]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[zip]]></category>
		<category><![CDATA[ZIP Code]]></category>

		<guid isPermaLink="false">http://www.coffeecuphalfmoons.com/?p=963</guid>
		<description><![CDATA[If you&#8217;re a web developer and happen to develop software for use in e-commerce, chances are, somewhere along the lines you&#8217;ll need or want to integrate with the big 4 shippers&#8217; (UPS, USPS, FedEx, DHL) APIs.  You&#8217;ll find right off the bat that they all offer rather robust APIs, so your options are sufficient. Then [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a web developer and happen to develop software for use in e-commerce, chances are, somewhere along the lines you&#8217;ll need or want to integrate with the big 4 shippers&#8217; (UPS, USPS, FedEx, DHL) APIs.  You&#8217;ll find right off the bat that they all offer rather robust APIs, so your options are sufficient.</p>
<p>Then you&#8217;ll get to programming and realize that the documentation is pretty crappy, but specifically I want to address the idiosyncrasies of the USPS &#8220;test&#8221; environment.  Effectively, what USPS means when they say &#8220;test&#8221; is not a test of robustness of your application, but simply whether or not your application can build a sample request (an EXACT sample request), and send it to their server.  Yeah &#8212; it&#8217;s like asking a math teacher to write the numbers 1 to 30 on a sheet of paper (in order) before he/she can get hired.</p>
<p>The problem is, the USPS docs don&#8217;t tell you this, nor do they show you the sample request.  So, for others who are about to embark on a few hour journey finding these details on Google (or worse, emailing USPS directly &#8230;eeek) I&#8217;m going to sum up a few facts here.</p>
<p>The most laborious for me so far is the one I already mentioned above.  For a rate request, the docs show you a RateV3Request, but in testing you can only use a RateV2 request (which does not support package dimensions).  Also, you must use the zip codes 10022 and 20008 for origination and zip, as well as 10 lbs. 5 oz. for the weight, and &#8220;LARGE&#8221; for the size.  Everything else (LAUGH) you have leeway with.</p>
<p>If you don&#8217;t use these exact values, you&#8217;ll get responses like &#8220;Please enter a valid zip code for the sender&#8221; (which of course makes you think you wrote the XML incorrectly) or &#8220;The package size must be &#8216;Regular&#8217;, &#8216;Large&#8217;, or &#8216;Oversize.&#8217;&#8221; (even though you have &#8220;regular&#8221; quite clearly in the request.</p>
<p>The advice is to get to production as soon as possible, though why USPS would design things this way is beyond me, but them&#8217;s the cards, you gotta play &#8216;em.</p>
<p>I will add more here as I find them obstaclicious enough (yeah I just made up that word).</p>
<p>Amendment 1:  <em>I should add that the issues about the documentation not mentioning the &#8220;canned&#8221; requests is only applicable to the PDF documentation.  It is stated quite clearly in the HTML versions.  Go figure &#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/05/20/usps-shipping-xml-api-testing-idiosyncrasies/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Google AdSense rejection and cross-domain duplicate content experience</title>
		<link>http://www.crimulus.com/2010/03/08/google-adsense-rejection-and-cross-domain-duplicate-content-experience/</link>
		<comments>http://www.crimulus.com/2010/03/08/google-adsense-rejection-and-cross-domain-duplicate-content-experience/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 23:38:56 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[canonical urls]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[cross domain canonical urls]]></category>
		<category><![CDATA[cross domain duplicate content]]></category>
		<category><![CDATA[duplicate content]]></category>
		<category><![CDATA[Eureka]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[google adsense rejection]]></category>
		<category><![CDATA[Jeremy]]></category>
		<category><![CDATA[music site]]></category>
		<category><![CDATA[reasonable solution]]></category>
		<category><![CDATA[rejection]]></category>
		<category><![CDATA[reorganization]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[unacceptable site content]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.coffeecuphalfmoons.com/?p=842</guid>
		<description><![CDATA[Since the rejection replies you get from Google regarding applications to their AdSense program can be quite vague and even cryptic, I thought I would share my experience. First things first, you are not going to get to talk to Google directly &#8212; you have to use the forums. (Here is my thread.) My rejection [...]]]></description>
			<content:encoded><![CDATA[<p>Since the rejection replies you get from Google regarding applications to their AdSense program can be quite vague and even cryptic, I thought I would share my experience.  First things first, you are not going to get to talk to Google directly &#8212; you have to use the forums.  (<a href="http://www.google.com/support/forum/p/AdSense/thread?fid=284bd0c363ce809700048149d0a334cc&amp;hl=en">Here is my thread</a>.)</p>
<p>My rejection was simply:</p>
<blockquote><p>Hello Jeremy,</p>
<p>Thank you for your interest in Google AdSense. Unfortunately, after<br />
reviewing your application, we&#8217;re unable to accept you into Google AdSense<br />
at this time.</p>
<p>We did not approve your application for the reasons listed below.</p>
<p>Issues:</p>
<p>- Unacceptable site content</p></blockquote>
<p>Looking around their restrictions, I really could not find a solution, as I couldn&#8217;t find any rule that I explicitly violated.  I posted a request for insight on the forums, and a very insightful user (<a href="http://www.google.com/support/forum/p/AdSense/user?userid=10290987188347555551&amp;hl=en">wasaweb</a>) pointed out my extensive duplicate content on http://jeremytharp.com/ and http://www.coffeecuphalfmoons.com/.  And it&#8217;s true &#8212; I use my blog&#8217;s rss to feed much of the content on my music site.</p>
<p>Since I want to keep the sites separate, I saw no reasonable solution, but then I discovered that recently <a href="http://googlewebmastercentral.blogspot.com/2009/12/handling-legitimate-cross-domain.html">Google began allowing cross-domain canonical URLs</a>.  Eureka!  I simply set the <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html">canonical URLs</a> on the pages on jeremytharp.com that fed from coffeecuphalfmoons.com to the appropriate page that fed the same content on coffeecuphalfmoons.com.  When I resubmitted the AdSense application, it was approved!</p>
<p>Keep in mind that there are a LOT of reasons you might get rejected from AdSense, but given that this was very simply successful, I thought I would share.</p>
<p>I also noticed an immediate reorganization of my <a href="http://www.google.com/search?q=site%3Ajeremytharp.com">site:jeremytharp.com</a> results on Google (for the better).  I&#8217;m hoping it has some positive effects on PR on both pages as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/03/08/google-adsense-rejection-and-cross-domain-duplicate-content-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

