<?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>Peregrine Salon, LLC &#187; php</title>
	<atom:link href="http://www.peregrinesalon.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peregrinesalon.com</link>
	<description>Virtual Worlds, Technology, the Future, &#38; More!</description>
	<lastBuildDate>Tue, 03 Aug 2010 19:17:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How To: Process Second Life Snap Shots Sent as Email into WordPress (and more!)</title>
		<link>http://www.peregrinesalon.com/2008/12/04/how-to-process-second-life-snap-shots-sent-as-email-into-wordpress-and-more/</link>
		<comments>http://www.peregrinesalon.com/2008/12/04/how-to-process-second-life-snap-shots-sent-as-email-into-wordpress-and-more/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 17:18:52 +0000</pubDate>
		<dc:creator>FlipperPA</dc:creator>
				<category><![CDATA[Education & Training]]></category>
		<category><![CDATA[Virtual Worlds]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[second blogger]]></category>
		<category><![CDATA[sled]]></category>
		<category><![CDATA[snap shots]]></category>

		<guid isPermaLink="false">http://www.peregrinesalon.com/?p=92</guid>
		<description><![CDATA[<p class="wp-caption-text">Register for Second Blogger!</p>
<p>SecondBlogger is a free site I created that allows anyone with a Second Life avatar to register and blog to a common location. It runs on the WordPress back end, but also includes an option for people to blog from in-world, by sending an email post-card. This script will allow you to [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_94" class="wp-caption alignright" style="width: 273px"><a href="http://www.SecondBlogger.com/"><img class="size-medium wp-image-94" title="Second Blogger" src="http://www.peregrinesalon.com/wp-content/uploads/2008/12/14_s1-263x300.jpg" alt="Register for Second Blogger!" width="263" height="300" /></a><p class="wp-caption-text">Register for Second Blogger!</p></div>
<p><a title="Second Blogger" href="http://www.secondblogger.com" target="_blank">SecondBlogger</a> is a free site I created that allows anyone with a Second Life avatar to register and blog to a common location. It runs on the WordPress back end, but also includes an option for people to blog from in-world, by sending an email post-card. This script will allow you to do this from most systems running *nix flavors. This script included here assumes you are running WordPress on the ISP Dreamhost, however, it should be fairly easily modifiable for any major Linux-based hosting solution using PHP and MySQL; I&#8217;ve used it under two, one running sendmail, and one running qmail. It can be easily modified to use a single file in /var/spool/mail &#8211; but is currently configured to use a /Maildir configuration. It isn&#8217;t pretty &#8211; it is brute force &#8211; for it works.</p>
<p>Here&#8217;s a link to download the PHP script source:</p>
<p><a title="Process SL Snap Shots" href="http://www.peregrinesalon.com/process_sl_snap.phps" target="_blank">http://www.peregrinesalon.com/process_sl_snap.phps</a></p>
<p>General instructions:</p>
<p>(1) The script uses ImageMagick, which comes included with most Linux distributions, and is pre-installed on most shared ISPs (like Dreamhost). To find out where it is installed, simply type &#8220;which mogrify&#8221;, and that will tell you what path to use for the variable $imagemagick_path. ImageMagick is free, so you can also download and install it, if it isn&#8217;t installed.</p>
<p>(2) If you&#8217;re using <a title="DreamHost" href="http://www.dreamhost.com" target="_blank">Dreamhost</a>, you&#8217;ll have to set up an email account to receive posts. Go to Mail &#8211;&gt; Manage Mail, and create an account (something like blog@yourblog.com).</p>
<p>(3) Still on Dreamhost, you&#8217;ll now have to set up an Email Filter, in the left hand navigation. Since all SL snap shots contain the word &#8220;Visit&#8221;, I set mine to forward all messages that arrive to blog@secondblogger.com to forward to my user account on my machine, and then stop. This will take any email that arrives, and write is as a flat file into &#8220;Maildir/new&#8221; under your shell account. The script will then pick up any email from that directory and parse it.</p>
<p>(4) Be sure to set all the variables at the top of the script correctly. Try running it with the command &#8220;php process_sl_snap.php&#8221; from the command line, and see what happens!</p>
<p>(5) Next, set up a cron job to run the script on the regular basis. On Dreamhost, click Goodies, Cron Jobs, and add one. Rename the script from source to a .php extension, and set the cron job up to run every six minutes (the maximum for most shared ISPs). I run it at 0, 6, 12, 18, 24, 30, 36, 42, 48, and 54 minutes after the house, every hour, with the command &#8220;php /home/user_name/process_sl_snap.php&#8221;.</p>
<p>(6) That&#8217;s it! This is clearly done for Dreamhost, but most ISPs support similar functionality. You&#8217;ll have to find out how to route email to your shell account, and run the script.</p>
<p>(7) I&#8217;m very busy, so I&#8217;m afraid I can&#8217;t offer support for this; the product is provided as-is, with no guarantees of any kind. If you have luck getting it to work on a different configuration, please post to comments what changes (if any) you had to make, and a link to any new source code modifications you have made. There&#8217;s tons of room for improvement to this script, as I hacked it together pretty quickly one Saturday morning when I couldn&#8217;t sleep in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peregrinesalon.com/2008/12/04/how-to-process-second-life-snap-shots-sent-as-email-into-wordpress-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
