<?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>Ryan Joy (atxryan) &#187; PHP</title>
	<atom:link href="http://ryanjoy.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanjoy.com</link>
	<description>Web developer living and playing in Austin, Texas</description>
	<lastBuildDate>Thu, 24 May 2012 21:09:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Onion Uses Django, And Why It Matters To Us</title>
		<link>http://ryanjoy.com/2010/03/the-onion-uses-django-and-why-it-matters-to-us/</link>
		<comments>http://ryanjoy.com/2010/03/the-onion-uses-django-and-why-it-matters-to-us/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 17:10:22 +0000</pubDate>
		<dc:creator>atxryan</dc:creator>
				<category><![CDATA[Shared]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[theonion]]></category>

		<guid isPermaLink="false">http://delicious.com/url/804b0f05647d166baec27bb8ad8611b8#atxryan</guid>
		<description><![CDATA[&#34;Cleaner. Much cleaner. Proper unit testing. Real reusable components across applications. An ORM rather than a just a series of functional query helpers.&#34;]]></description>
			<content:encoded><![CDATA[<p>&quot;Cleaner. Much cleaner. Proper unit testing. Real reusable components across applications. An ORM rather than a just a series of functional query helpers.&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanjoy.com/2010/03/the-onion-uses-django-and-why-it-matters-to-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tools of the Trade: Web Development Frameworks that the Pros Use</title>
		<link>http://ryanjoy.com/2009/12/tools-of-the-trade-web-development-frameworks-that-the-pros-use/</link>
		<comments>http://ryanjoy.com/2009/12/tools-of-the-trade-web-development-frameworks-that-the-pros-use/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 22:10:51 +0000</pubDate>
		<dc:creator>atxryan</dc:creator>
				<category><![CDATA[Shared]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cript]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[ign]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webde]]></category>

		<guid isPermaLink="false">http://delicious.com/url/3888aed09a9ad057ef673d0325f8ac5c#atxryan</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ryanjoy.com/2009/12/tools-of-the-trade-web-development-frameworks-that-the-pros-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recover cached images from your visitors &#124; Diovo</title>
		<link>http://ryanjoy.com/2009/12/recover-cached-images-from-your-visitors-diovo/</link>
		<comments>http://ryanjoy.com/2009/12/recover-cached-images-from-your-visitors-diovo/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:07:15 +0000</pubDate>
		<dc:creator>atxryan</dc:creator>
				<category><![CDATA[Shared]]></category>
		<category><![CDATA[cript]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://delicious.com/url/adc2c9a92ebd7001f218f99fdfe30a3a#atxryan</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ryanjoy.com/2009/12/recover-cached-images-from-your-visitors-diovo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily delivery of an electronic newspaper</title>
		<link>http://ryanjoy.com/2008/02/daily-delivery-of-an-electronic-newspaper/</link>
		<comments>http://ryanjoy.com/2008/02/daily-delivery-of-an-electronic-newspaper/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 12:00:27 +0000</pubDate>
		<dc:creator>Ryan Joy</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.atxryan.com/2008/02/05/daily-delivery-of-an-electronic-newspaper/</guid>
		<description><![CDATA[I subscribe to Investor&#8217;s Business Daily for insight and valuable education as I gradually learn how to effectively invest in the market. It comes out Monday-Friday and obviously is very time relevant. I initially signed up for the print version so that I could read it on the bus and have something to highlight. However, [...]]]></description>
			<content:encoded><![CDATA[<p>I subscribe to Investor&#8217;s Business Daily for insight and valuable education as I gradually learn how to effectively invest in the market.  It comes out Monday-Friday and obviously is very time relevant.  I initially signed up for the print version so that I could read it on the bus and have something to highlight.  However, I ended up never getting it on time because it&#8217;d come in while I was at work and I&#8217;d end up not even looking at it when I got home.  I switched to the electronic version, but then I&#8217;d end up not downloading and reading the thing for weeks at a time.  I needed an &#8216;in-your-face&#8217; solution, so I wrote up this little PHP script to automatically download the eIBD every day and a separate shell script to open the PDF at 9am on my computer every weekday morning.  So, I essentially have it &#8216;delivered&#8217; to my desktop when I log on my Mac in the morning!</p>
<p>Here&#8217;s an example script to show how I did it.  I&#8217;ve removed the information specific to IBD.  Keep in mind that this script, as presented, does not log in to anything and assumed a filename format like 020508.pdf.  I wrote these scripts for Mac OS X 10.4 and used Cronnix to create the crontab entry.  It could easily be done on a Windows machine as well using the utilities provided by that system.</p>
<pre class="textmate-source cobalt">
<span class="text text_html text_html_basic"><span class="source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html"><span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_begin punctuation_definition_embedded_begin_php">&lt;?php</span>
<span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php">//</span>
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php">//</span> Provided as-is without warranty.
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php">//</span>
</span>

<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_interface support_function_interface_php">curl_init</span>()<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>today</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">mdy</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>)

<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span><span class="keyword keyword_control keyword_control_php">if</span>(<span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">w</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>) <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php">==</span> <span class="constant constant_numeric constant_numeric_php">0</span>) {
  <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$monday</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_php_date support_function_php_date_php">mktime</span>(<span class="constant constant_numeric constant_numeric_php">0</span>, <span class="constant constant_numeric constant_numeric_php">0</span>, <span class="constant constant_numeric constant_numeric_php">0</span>, <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">m</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>), <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">d</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>)<span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_php">+</span><span class="constant constant_numeric constant_numeric_php">1</span>, <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">y</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>))<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
  <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>today</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">mdy</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>, <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$monday</span></span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
}

<span class="keyword keyword_control keyword_control_php">if</span>(<span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">w</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>) <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php">==</span>  <span class="constant constant_numeric constant_numeric_php">6</span>) {
  <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$monday</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_php_date support_function_php_date_php">mktime</span>(<span class="constant constant_numeric constant_numeric_php">0</span>, <span class="constant constant_numeric constant_numeric_php">0</span>, <span class="constant constant_numeric constant_numeric_php">0</span>, <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">m</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>), <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">d</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>)<span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_php">+</span><span class="constant constant_numeric constant_numeric_php">2</span>, <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">y</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>))<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
  <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>today</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_php_date support_function_php_date_php">date</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">mdy</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>, <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>monday</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
}

<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>pdf_url</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php"><a href="http://www.example.com/pdf/" rel="nofollow">http://www.example.com/pdf/</a></span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span> <span class="keyword keyword_operator keyword_operator_string keyword_operator_string_php">.</span> <span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php"><span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>today</span>.pdf</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span><span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>fp</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php">=</span> <span class="support support_function support_function_file support_function_file_php">fopen</span>(<span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">/Users/username/path/to/pdf/archive/<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>today</span>.pdf</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>, <span class="string string_quoted string_quoted_double string_quoted_double_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">"</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php">w</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">"</span></span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>

<span class="support support_function support_function_interface support_function_interface_php">curl_setopt</span> (<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span>, <span class="constant constant_other constant_other_php">CURLOPT_URL</span>, <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>pdf_url</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="support support_function support_function_interface support_function_interface_php">curl_setopt</span> (<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span>, <span class="constant constant_other constant_other_php">CURLOPT_FILE</span>, <span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>fp</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="support support_function support_function_interface support_function_interface_php">curl_setopt</span> (<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span>, <span class="constant constant_other constant_other_php">CURLOPT_HEADER</span>, <span class="constant constant_numeric constant_numeric_php">0</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="support support_function support_function_interface support_function_interface_php">curl_exec</span> (<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="support support_function support_function_interface support_function_interface_php">curl_close</span> (<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>ch</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="support support_function support_function_file support_function_file_php">fclose</span>(<span class="variable variable_other variable_other_php"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php">$</span>fp</span>)<span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php">;</span>
<span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_end punctuation_definition_embedded_end_php"><span class="source source_php">?</span>&gt;</span>
</span></span></pre>
<p>And the shell script to open the PDF&#8230;</p>
<pre class="textmate-source cobalt"><span class="source source_shell">DATE=<span class="string string_interpolated string_interpolated_backtick string_interpolated_backtick_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">`</span>date '+%m%d%y'<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">`</span></span><span class="keyword keyword_operator keyword_operator_list keyword_operator_list_shell">;</span>
FILE=<span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/path/to/pdf/archive/<span class="variable variable_other variable_other_bracket variable_other_bracket_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">${</span>DATE<span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">}</span></span>.pdf<span class="keyword keyword_operator keyword_operator_list keyword_operator_list_shell">;</span>
<span class="keyword keyword_control keyword_control_shell">if</span> [ -e <span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>FILE</span> ]<span class="keyword keyword_operator keyword_operator_list keyword_operator_list_shell">;</span> <span class="keyword keyword_control keyword_control_shell">then</span>
  open /Applications/Preview.app <span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>FILE</span><span class="keyword keyword_operator keyword_operator_list keyword_operator_list_shell">;</span>
<span class="keyword keyword_control keyword_control_shell">fi</span>
</span></pre>
<p>And the crontab used to download the PDF each day at 11pm and open the file for me at 9am.</p>
<pre class="textmate-source cobalt">
30      23      *       *       *               php /path/to/script.php
0       9       *       *       1,2,3,4,5,7     sh /path/to/pdf_opener.sh
</pre>
<p>I might clean this up a bit, but I just wanted to share it in case anyone else had a similar need for daily download and view.  Feel free to offer suggestions for other ways to achieve this.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanjoy.com/2008/02/daily-delivery-of-an-electronic-newspaper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Statesman.com &amp; Austin360.com now on Twitter</title>
		<link>http://ryanjoy.com/2007/05/statesmancom-austin360com-now-on-twitter/</link>
		<comments>http://ryanjoy.com/2007/05/statesmancom-austin360com-now-on-twitter/#comments</comments>
		<pubDate>Wed, 02 May 2007 01:30:03 +0000</pubDate>
		<dc:creator>Ryan Joy</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Statesman]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.atxryan.com/2007/05/01/statesmancom-austin360com-now-on-twitter/</guid>
		<description><![CDATA[Wondering why the local Austin paper doesn&#8217;t have a Twitter account so I can get updates like NYT. Ryan, thoughts? Paul Menard via Twitter Well, it&#8217;s true that you can find Twitter accounts for the New York Times, CNN, BBC, TechCrunch, et al. However, it&#8217;s not clear how many of those are actually official branding [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Wondering why the local Austin paper doesn&#8217;t have a Twitter account so I can get updates like NYT. Ryan, thoughts?</em><br />
<a href="http://twitter.com/codehooligans/statuses/46252272" target="_blank">Paul Menard via Twitter</a></p></blockquote>
<p>Well, it&#8217;s true that you can find Twitter accounts for the <a href="http://twitter.com/nytimes">New</a> <a href="http://twitter.com/nyt_world">York</a> <a href="http://twitter.com/nyt">Times</a>, <a href="http://twitter.com/cnn">CNN</a>, <a href="http://twitter.com/bbc">BBC</a>, <a href="http://twitter.com/techcrunch">TechCrunch</a>, et al. However, it&#8217;s not clear how many of those are actually official branding efforts by those media organizations. In fact, the open nature of the Twitter API and the fact that these companies offer their latest headlines as RSS feeds mean anyone can create a news &#8220;river&#8221;.</p>
<p>Regardless I had to take up the challenge after being called out directly. I quickly registered accounts from both Statesman.com and Austin360.com. A quick and dirty PHP script later set up as a cron job and <em>voila!</em> While these sites are among those of my employer, my Twitter accounts do not constitute an &#8220;official&#8221; use of this syndication method. The NYTimes twitter was set up in a <a href="http://scripting.wordpress.com/2007/03/18/scripting-news-for-3182007/#comment-43926">similar vein</a> by <a href="http://twitter.com/harrisj">Jacob Harris</a></p>
<p><a href="http://twitter.com/statesman">http://twitter.com/statesman</a><br />
<a href="http://twitter.com/austin360">http://twitter.com/austin360</a></p>
<p><strong>Update:</strong> I&#8217;ve turned off the cron job until some sort of contextual relevance can be offered to any potential users. Breaking news, weather, jury verdicts, traffic, ticket sales, event listings, A-List events are all options.</p>
<p><strong>What are your thoughts? What kind of updates would you be interested in receiving?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://ryanjoy.com/2007/05/statesmancom-austin360com-now-on-twitter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

