<?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>Problems to Solve &#187; Programming</title>
	<atom:link href="http://problemstosolve.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://problemstosolve.com</link>
	<description>A Blog dedicated to solving problems.</description>
	<lastBuildDate>Mon, 30 Jan 2012 01:10:06 +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 DOMDocument stops render on errors</title>
		<link>http://problemstosolve.com/2012/01/28/php-domdocument-stops-render-on-errors/</link>
		<comments>http://problemstosolve.com/2012/01/28/php-domdocument-stops-render-on-errors/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 13:26:47 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=267</guid>
		<description><![CDATA[Several of PHP&#8217;s DomDocument functions halt rendering the page on any kind of error, and are finicky to test. I was parsing an RSS feed and wanted to display a scaled down version of the image in the feed. This code worked if the code contained an image: $rss = @file_get_contents('http://problemstosolve.com/?feed=rss2', false); if($rss === false) [...]]]></description>
			<content:encoded><![CDATA[<p>Several of PHP&#8217;s DomDocument functions halt rendering the page on any kind of error, and are finicky to test. I was parsing an RSS feed and wanted to display a scaled down version of the image in the feed. This code worked if the code contained an image:<br />
<code>$rss = @file_get_contents('http://problemstosolve.com/?feed=rss2', false);<br />
if($rss === false)<br />
{<br />
$feed = false;<br />
}else<br />
{<br />
$feed = mb_convert_encoding($rss, "HTML-ENTITIES", "UTF-8");<br />
}<br />
$result = new SimpleXMLElement($feed);<br />
foreach($result-&gt;channel-&gt;item as $item)<br />
{<br />
$content = $item-&gt;children('http://purl.org/rss/1.0/modules/content/');<br />
$dom = new DOMDocument();<br />
$dom-&gt;loadHTML($content-&gt;encoded);<br />
$images = $dom-&gt;getElementsByTagName('img');<br />
echo "&lt;img src=\"" . $images-&gt;item(0)-&gt;getAttribute('src') . "\" width=\"100\" /&gt;&lt;br/&gt;";<br />
}</code></p>
<p>However, if the post didn&#8217;t contain an image, the whole page would blow up with no PHP error. To make things worse, if the problem was in one of several codeigniter views, it would make codeigniter display the views out of order. None of these tests for images worked:</p>
<p><code>//didn't work<br />
if(!$images)<br />
//didn't work<br />
if(!empty($images))<br />
//didn't work<br />
if(!empty($images-&gt;hasAttribute('src')))<br />
//didn't work<br />
if(!empty($images-&gt;item(0)))<br />
//didn't work<br />
if(!$images-&gt;children)<br />
//didn't work<br />
if($images-&gt;length() == 0)</code></p>
<p>What finally worked was:<br />
<code>if($images-&gt;length == 0)</code></p>
<p>getElementsByTagName always returns a DOMNodeList and it&#8217;s hard to check to see if it actually contains anything. I haven&#8217;t figured out a way for PHP to handle errors better with DOMDocument.</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2012/01/28/php-domdocument-stops-render-on-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Run Two Instances of TextWrangler at Once [Solved]</title>
		<link>http://problemstosolve.com/2011/12/06/run-two-instances-of-textwrangler-at-once-solved/</link>
		<comments>http://problemstosolve.com/2011/12/06/run-two-instances-of-textwrangler-at-once-solved/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 17:13:35 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=255</guid>
		<description><![CDATA[Update:Barebones support got back to me and explained why this wasn&#8217;t working, this method broke their codesigning. But they had a solution: Simply go to File > New > FTP/SFTP Browser. Thanks Barebones! Edit: Darn, I&#8217;m getting this error when trying to open remote documents: (MacOS Error code: -25293) When I&#8217;m working on two projects [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong>Barebones support got back to me and explained why this wasn&#8217;t working, this method broke their codesigning. But they had a solution: Simply go to File > New > FTP/SFTP Browser. Thanks Barebones!</p>
<p><del datetime="2011-12-06T19:57:32+00:00"><br />
Edit: Darn, I&#8217;m getting this error when trying to open remote documents: (MacOS Error code: -25293)<br />
</del></p>
<p><del datetime="2011-12-06T19:58:41+00:00">When I&#8217;m working on two projects at once, or want to grab a remote file from FTP when I already have one FTP site open, it would be nice to run two instances of TextWrangler at once, since it only supports having one FTP site open at a time.</del></p>
<p><del datetime="2011-12-06T19:58:41+00:00">I figured out how:</del><br />
<del datetime="2011-12-06T19:58:41+00:00"><br />
-Go to Applications/ and right click on TextWrangler and select Duplicate.<br />
-Rename Textwrangler copy to Textwrangler2<br />
-Right click on Textwrangler and choose &#8220;Show Package Contents&#8221;<br />
-Open info.plist inside the Contents folder<br />
-Change the data from<br />
</del><br />
<del datetime="2011-12-06T19:58:41+00:00"></p>
<pre>
	&lt;key&gt;CFBundleIdentifier&lt;/key&gt;
	&lt;string>com.barebones.textwrangler&lt;/string&gt;
</pre>
<p></del><br />
<del datetime="2011-12-06T19:58:41+00:00"><br />
to<br />
</del><br />
<del datetime="2011-12-06T19:58:41+00:00"></p>
<pre>
	&lt;key&gt;CFBundleIdentifier<&lt;/key&gt;
	&lt;string&gt;com.barebones.textwrangler2&lt;/string&gt;
</pre>
<p></del><br />
<del datetime="2011-12-06T19:58:41+00:00"><br />
Now you can open both TextWrangler apps.<br />
</del><br />
<del datetime="2011-12-06T19:58:41+00:00"><br />
Optionally, grab this snazzy textwrangler alternative icon from this page:<br />
<a href="http://sethlilly.deviantart.com/art/TextWrangler-Replacement-Icon-180898652" title="http://sethlilly.deviantart.com/art/TextWrangler-Replacement-Icon-180898652" target="_blank">http://sethlilly.deviantart.com/art/TextWrangler-Replacement-Icon-180898652</a><br />
Right click and choose "copy image". Then get info on TextWrangler2, click on the small icon in the top right, and hit command-V to paste. That way it's easy to tell the two instances apart in the Dock and switching between applications.<br />
</del></p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2011/12/06/run-two-instances-of-textwrangler-at-once-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql Avg() doesn&#8217;t work with enums or sets</title>
		<link>http://problemstosolve.com/2011/11/04/mysql-avg-doesnt-work-with-enums-or-sets/</link>
		<comments>http://problemstosolve.com/2011/11/04/mysql-avg-doesnt-work-with-enums-or-sets/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 02:59:31 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=253</guid>
		<description><![CDATA[I had a very simple votes table with a rating column which was defined as a SET(&#8217;1&#8242;,&#8217;2&#8242;,&#8217;3&#8242;,&#8217;4&#8242;,&#8217;5&#8242;). This was meant to be easy to rate items from 1 to 5 stars. Then I had the following values: item_id rating 1 3 1 4 1 4 1 5 When I ran SELECT AVG(&#8216;rating&#8217;) FROM votes WHERE [...]]]></description>
			<content:encoded><![CDATA[<p>I had a very simple votes table with a rating column which was defined as a SET(&#8217;1&#8242;,&#8217;2&#8242;,&#8217;3&#8242;,&#8217;4&#8242;,&#8217;5&#8242;). This was meant to be easy to rate items from 1 to 5 stars.<br />
Then I had the following values:</p>
<p><code>item_id  rating<br />
1        3<br />
1        4<br />
1        4<br />
1        5</code></p>
<p>When I ran SELECT AVG(&#8216;rating&#8217;) FROM votes WHERE item_id = 1, I would mysteriously get &#8217;9&#8242; instead of &#8217;4&#8242;.</p>
<p>It turned out that ENUM and SETs return the index of the ratings, in powers of 2 for some reason, instead of the rating values themselves. So SELECT item_id, rating, CONV(rating, UNSIGNED) produced this:<br />
<code>item_id rating CONV(rating, unsigned)<br />
1       3      4<br />
1       4      8<br />
1       4      8<br />
1       5      16</code></p>
<p>So the average of the indexes of the set would be 9.</p>
<p>Instead I had to convert the set to a string, then convert the string to an unsigned INT to get the results I wanted:<br />
SELECT rating, AVG( CONVERT( CONVERT( rating, CHAR ) , UNSIGNED ) ) FROM votes WHERE item_id = 1;</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2011/11/04/mysql-avg-doesnt-work-with-enums-or-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create an encrypted folder with OS X Disk Utility [Solved]</title>
		<link>http://problemstosolve.com/2010/09/19/create-an-encrypted-folder-with-os-x-disk-utility-solved/</link>
		<comments>http://problemstosolve.com/2010/09/19/create-an-encrypted-folder-with-os-x-disk-utility-solved/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 23:04:09 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=221</guid>
		<description><![CDATA[I run several servers on my mac, and worry about getting hacked or accidentally sharing sensitive files. In addition, I worry about sensitive files when I take the computer in for tech support, or when others use my computer. Documents such as my tax files contain my social security number. I don&#8217;t have to worry [...]]]></description>
			<content:encoded><![CDATA[<p>I run several servers on my mac, and worry about getting hacked or accidentally sharing sensitive files. In addition, I worry about sensitive files when I take the computer in for tech support, or when others use my computer. Documents such as my tax files contain my social security number.</p>
<p>I don&#8217;t have to worry any longer (until AES is cracked, anyway), because it is easy to create an encrypted disk image on OS X. I followed the instructions here:</p>
<p><a href="http://blog.smalldog.com/article/1814/use-disk-utility-to-encrypt-files/">http://blog.smalldog.com/article/1814/use-disk-utility-to-encrypt-files/</a></p>
<p>I chose a 2.5 GB image, which automatically suggested a CD/DVD type partition. I&#8217;m not sure what partition type to use but don&#8217;t think it matters. These were the settings I used:</p>
<p><a href="http://problemstosolve.com/wp-content/uploads/Screen-shot-2010-09-19-at-3.55.55-PM.jpg"><img src="http://problemstosolve.com/wp-content/uploads/Screen-shot-2010-09-19-at-3.55.55-PM.jpg" alt="" title="Disk Utility Encrypted Image settings" width="617" height="567" class="alignnone size-full wp-image-223" /></a></p>
<p>This will create a .sparseimage file. Sparse images are nice because they don&#8217;t actually take up their entire hard drive space until they&#8217;re filled with contents.</p>
<p>Note that after you drag the files in, you still have to delete the originals. Then when you eject the encrypted image, they are protected. When you double click on the image again, it will ask you for your password. Don&#8217;t forget this password, because it is impossible to recover!</p>
<p>I used spotlight to search my computer for files containing my passwords or social security number. If they were necessary, I dragged them in here, otherwise I deleted them.</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2010/09/19/create-an-encrypted-folder-with-os-x-disk-utility-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Growl Notifications on VNC connections, SSH attempts, and HTTP logs [solved]</title>
		<link>http://problemstosolve.com/2010/01/28/get-growl-notifications-on-vnc-connections-ssh-attempts-and-http-logs-solved/</link>
		<comments>http://problemstosolve.com/2010/01/28/get-growl-notifications-on-vnc-connections-ssh-attempts-and-http-logs-solved/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:40:35 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=192</guid>
		<description><![CDATA[Use this script to monitor VNC connections with Vine Server: nice -n 100 tail -n 0 -f /Users/jordan/Library/Logs/VineServer.log &#124; php -r 'while ($m = fgets(STDIN)) shell_exec("growlnotify -p 0 Vine Server -m ". escapeshellarg($m));' Change &#8220;jordan&#8221; to your username (home directory), or the whole path of the log if you&#8217;re monitoring something else. &#8220;Vine Server&#8221; is [...]]]></description>
			<content:encoded><![CDATA[<p>Use this script to monitor VNC connections with Vine Server:<br />
<code>nice -n 100 tail -n 0 -f /Users/jordan/Library/Logs/VineServer.log | php -r 'while ($m = fgets(STDIN)) shell_exec("growlnotify -p 0 Vine Server -m ". escapeshellarg($m));'</code></p>
<p>Change &#8220;jordan&#8221; to your username (home directory), or the whole path of the log if you&#8217;re monitoring something else. &#8220;Vine Server&#8221; is the alert title, which could be anything (&#8220;Hello World&#8221;).</p>
<p>Save this as a file such as vncnotify.sh. Run<br />
<code>chmod 755 vncnotify.sh</code><br />
and then you can run the command by typing ./vinenotify.sh.</p>
<p>Duplicate this file and name it vinenotify.command.<br />
Finally, in System Preferences > Accounts > Start up items, add vinenotify.command, and make it hidden, and it will run when you log in.</p>
<p>Things I&#8217;m still working on: preventing a string of notifications when you launch VNC; hiding the terminal window when you log in; and grepping for only connect/disconnect/login failures.<br />
Thanks to <a href="http://drewish.com/content/2008/06/using_growl_to_tail_a_log_file">drewish.com</a> for the growl tail code.</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2010/01/28/get-growl-notifications-on-vnc-connections-ssh-attempts-and-http-logs-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check for open logs running on OS X, unix or linux [solved]</title>
		<link>http://problemstosolve.com/2010/01/28/check-for-open-logs-running-on-os-x/</link>
		<comments>http://problemstosolve.com/2010/01/28/check-for-open-logs-running-on-os-x/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:31:07 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=190</guid>
		<description><![CDATA[Use this command to find the log you&#8217;re looking for: lsof &#124; grep -i log On OS X, typical directories I look in are /var/log/, $HOME/Library/Logs/, and /private/var/log/.]]></description>
			<content:encoded><![CDATA[<p>Use this command to find the log you&#8217;re looking for:<br />
lsof | grep -i log</p>
<p>On OS X, typical directories I look in are /var/log/, $HOME/Library/Logs/, and /private/var/log/.</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2010/01/28/check-for-open-logs-running-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Google Maps actually geo locate you in Firefox 3.5 [soved]</title>
		<link>http://problemstosolve.com/2009/07/03/make-google-maps-actually-geo-locate-you-in-firefox-3-5-soved/</link>
		<comments>http://problemstosolve.com/2009/07/03/make-google-maps-actually-geo-locate-you-in-firefox-3-5-soved/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 17:10:05 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=187</guid>
		<description><![CDATA[One of the most exciting features about Firefox 3.5 is its geo-location capabilities. But when I installed 3.5 and went to google maps, it didn&#8217;t automatically geo-locate me nor was there any option to. This blog has a bookmarklet you can place on your toolbar to click to geo-locate you in google maps. Create a [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most exciting features about Firefox 3.5 is its geo-location capabilities. But when I installed 3.5 and went to google maps, it didn&#8217;t automatically geo-locate me nor was there any option to.<br />
<a href="http://blog.johnath.com/2009/06/24/google-maps-geolocation-bookmarklet/">This blog</a> has a bookmarklet you can place on your toolbar to click to geo-locate you in google maps. Create a new toolbar bookmark, edit it, rename it &#8220;locate me&#8221; and paste in this code for the address:</p>
<p><code>javascript:function sv(s){document.querySelector("#q_d").value=s};sv("Checking...");navigator.geolocation.getCurrentPosition(function(a){c=a.coords;sv(c.latitude+"%20"+c.longitude);document.forms.q_form.submit();},function(){sv("Rejected!")});</code></p>
<p>Then when you go to google maps and click &#8220;locate me&#8221;, you can search for businesses near you wherever you are.</p>
<p>Thanks, John Ath!</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2009/07/03/make-google-maps-actually-geo-locate-you-in-firefox-3-5-soved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choose a random winner or randomize a list with terminal and PHP [solved]</title>
		<link>http://problemstosolve.com/2009/01/13/choose-a-random-winner-or-randomize-a-list-with-terminal-and-php-solved/</link>
		<comments>http://problemstosolve.com/2009/01/13/choose-a-random-winner-or-randomize-a-list-with-terminal-and-php-solved/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 02:52:29 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=159</guid>
		<description><![CDATA[I wrote this for my class, which needed to have a randomized order of presentations: php -r '$order = array("person1","person2","person3","person4","person5","person6","person7","person8","person9","person10");shuffle($order);foreach($order as $number=&#62;$name){echo $number+1 . " $name\n";}' To run it, open up terminal (in OS X) and paste it in. I&#8217;ve also had to choose a random winner for gift certificates before: php -r '$order = [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this for my class, which needed to have a randomized order of presentations:</p>
<p><code>php -r '$order = array("person1","person2","person3","person4","person5","person6","person7","person8","person9","person10");shuffle($order);foreach($order as $number=&gt;$name){echo $number+1 . " $name\n";}'</code></p>
<p>To run it, open up terminal (in OS X) and paste it in.</p>
<p>I&#8217;ve also had to choose a random winner for gift certificates before:<br />
<code>php -r '$order = array("person1","person2","person3","person4","person5","person6","person7","person8","person9","person10");shuffle($order);echo "$order[0]\n";'</code></p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2009/01/13/choose-a-random-winner-or-randomize-a-list-with-terminal-and-php-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google sort by date bookmarklet [solved]</title>
		<link>http://problemstosolve.com/2008/11/18/google-sort-by-date-bookmarklet/</link>
		<comments>http://problemstosolve.com/2008/11/18/google-sort-by-date-bookmarklet/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 19:54:29 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=148</guid>
		<description><![CDATA[Based on this URL hack to sort google results by date, I made a bookmarklet: javascript:location.href =location.href + '&#38;as_qdr=d'; Now if you google search and then click this button, it will sort your results by the newest date. Works in FF and Safari.]]></description>
			<content:encoded><![CDATA[<p>Based on <a href="http://www.tech-recipes.com/rx/2860/google_how_to_access_filter_by_date_dropdown_box/">this URL hack</a> to sort google results by date, I made a bookmarklet:<br />
<code>javascript:location.href =location.href + '&amp;as_qdr=d';</code><br />
Now if you google search and then click this button, it will sort your results by the newest date. Works in FF and Safari.<br />
<a href='http://problemstosolve.com/wp-content/uploads/google-sort-by-date1.jpg'><img src="http://problemstosolve.com/wp-content/uploads/google-sort-by-date1.jpg" alt="" title="google-sort-by-date1" width="500" height="380" class="aligncenter size-full wp-image-150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2008/11/18/google-sort-by-date-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>USPS Tracking package hack [solved]</title>
		<link>http://problemstosolve.com/2008/10/30/usps-tracking-package-hack/</link>
		<comments>http://problemstosolve.com/2008/10/30/usps-tracking-package-hack/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 16:15:33 +0000</pubDate>
		<dc:creator>jordan314</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://problemstosolve.com/?p=147</guid>
		<description><![CDATA[If you&#8217;re as obsessed as I am about tracking some packages, you&#8217;ll get sick of typing in your tracking number and submitting the form over and over. But if you go to: http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do it doesn&#8217;t work because the form used a POST method. Well, on the previous page, the form input field was called strOrigTrackNum. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re as obsessed as I am about tracking some packages, you&#8217;ll get sick of typing in your tracking number and submitting the form over and over. But if you go to:<br />
<a href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do">http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do</a><br />
it doesn&#8217;t work because the form used a POST method.<br />
Well, on the previous page, the form input field was called strOrigTrackNum. Some sites let you post a form via the GET method, so let&#8217;s see if this works:<br />
<a href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?strOrigTrackNum=[your tracking number]">http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?strOrigTrackNum=[your tracking number]</a><br />
Yup! Worked fine. Now you have a URL that you can bookmark to quickly track your shipment.</p>
]]></content:encoded>
			<wfw:commentRss>http://problemstosolve.com/2008/10/30/usps-tracking-package-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

