<?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>Kurt Nelson &#187; Programs</title>
	<atom:link href="http://thisisnotajoke.com/category/technology/programs/feed/" rel="self" type="application/rss+xml" />
	<link>http://thisisnotajoke.com</link>
	<description>My Various Random Ramblings</description>
	<lastBuildDate>Wed, 08 Feb 2012 04:09:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>AAAA for TinyDNS PHP Function</title>
		<link>http://thisisnotajoke.com/2011/07/12/aaaa-for-tinydns-php-function/</link>
		<comments>http://thisisnotajoke.com/2011/07/12/aaaa-for-tinydns-php-function/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 20:01:06 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[aaaa]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tinydns]]></category>

		<guid isPermaLink="false">http://thisisnotajoke.com/?p=362</guid>
		<description><![CDATA[TinyDNS has no native support for IPv6 so adding AAAA records is odd. These 3 PHP functions will generate the records for you allowing you to integrate them into your DNS/DHCP management system and sync with TinyDNS. $ip = $_REQUEST['ip']; $ttl = 86400; if(isset($_REQUEST['ttl'])) $ttl = $_REQUEST['ttl']; $host = $_REQUEST['host']; $ip_a = ip6Array($ip); echo ip6AAAA($ip_a, [...]]]></description>
			<content:encoded><![CDATA[<p>TinyDNS has no native support for IPv6 so adding AAAA records is odd. These 3 PHP functions will generate the records for you allowing you to integrate them into your DNS/DHCP management system and sync with TinyDNS.<br />
<code><br />
$ip = $_REQUEST['ip'];<br />
$ttl = 86400;<br />
if(isset($_REQUEST['ttl']))<br />
$ttl = $_REQUEST['ttl'];<br />
$host = $_REQUEST['host'];<br />
$ip_a = ip6Array($ip);<br />
echo ip6AAAA($ip_a, $host, $ttl)."<br />
";<br />
echo ip6rDNS($ip_a, $host, $ttl)."<br />
";</code></p>
<p>//Pad out and turn into array<br />
function ip6Array($ip){<br />
//Make sure we have 8 parts<br />
while(count(explode(&#8220;:&#8221;,$ip)) &lt; 8){<br />
$ip = str_replace(&#8220;::&#8221;,&#8221;:::&#8221;,$ip);<br />
}<br />
$ip_a = explode(&#8220;:&#8221;,$ip);<br />
for($i=0;$i&lt;8;$i++){ 		$ip_a[$i]=str_pad($ip_a[$i],4,&#8221;0&#8243;,STR_PAD_LEFT); 	} 	return $ip_a; } //Takes in a padded IPv6 array and returns a tinyDNS entry function ip6AAAA($ip,$host,$ttl=86400){ 	if(count($ip) != 8 || $host == &#8220;&#8221;){ 		return; 	} 	//Convert to octal 	$oct=array(); 	foreach($ip as $i){ 		//Convert the hex into two octal chunks because tinyDNS says so. 		$p1 = base_convert(substr($i,0,2), 16, 8); 		$p2 = base_convert(substr($i,2,2), 16, 8); 		$oct[] = &#8220;\\&#8221;.str_pad($p1,3,&#8221;0&#8243;,STR_PAD_LEFT); 		$oct[] = &#8220;\\&#8221;.str_pad($p2,3,&#8221;0&#8243;,STR_PAD_LEFT);	 	} 	 	//Assemble it 	$result=&#8221;:&#8221;.$host.&#8221;:28:&#8221;; 	foreach($oct as $o) 		$result .= $o; 	return $result.&#8221;:&#8221;.$ttl; } //Takes in a padded IPv6 array and returns a tinyDNS entry function ip6rDNS($ip,$host,$ttl=86400){ 	//Now let&#8217;s make the rDNS 	$result = &#8220;ip6.arpa&#8221;; 	foreach($ip as $i){ 		$result = substr($i,3,1).&#8217;.&#8217;.substr($i,2,1).&#8217;.&#8217;.substr($i,1,1).&#8217;.&#8217;.substr($i,0,1).&#8217;.&#8217;.$result; 	} 	return &#8220;^&#8221;.$result.&#8221;:&#8221;.$host.&#8221;:&#8221;.$ttl; } ?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://thisisnotajoke.com/2011/07/12/aaaa-for-tinydns-php-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typepad -&gt; WordPress Migration Assistant</title>
		<link>http://thisisnotajoke.com/2008/03/31/typepad-wordpress-migration-assistant/</link>
		<comments>http://thisisnotajoke.com/2008/03/31/typepad-wordpress-migration-assistant/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 15:06:42 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[typepad]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://thisisnotajoke.com/?p=130</guid>
		<description><![CDATA[New script to change your wordpress post slugs to typepad format.]]></description>
			<content:encoded><![CDATA[<p>While helping a client migrate his blog from Typepad to WordPress, the most tedious part was updating the post slugs to keep old links intact. I wrote a script that will go through all WordPress posts, and change their slugs to typepad format. This  can be combined with the forward old slugs plugin to keep old links intact, while still using WordPress&#8217;s much cleaner URLs. The script is available on my <a href="http://dowloads.thisisnotajoke.com/fixSlugs.txt">download</a> page or can be bought with a donation through my store.</p>
]]></content:encoded>
			<wfw:commentRss>http://thisisnotajoke.com/2008/03/31/typepad-wordpress-migration-assistant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

