<?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>Drew Johnston &#187; PHP</title>
	<atom:link href="http://drewjoh.com/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://drewjoh.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 05:03:50 +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>PHP Time Based UUID Function (GUID)</title>
		<link>http://drewjoh.com/blog/2009/07/php-time-based-uuid-function-guid/</link>
		<comments>http://drewjoh.com/blog/2009/07/php-time-based-uuid-function-guid/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 21:50:27 +0000</pubDate>
		<dc:creator>Drew</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[guid]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[primary key]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://drewjoh.com/blog/?p=74</guid>
		<description><![CDATA[In my desire to find the &#8220;right&#8221; UUID function to use in my application, I grew to like the MySQL UUID() results produced because they are partially time based. But I didn&#8217;t like that I have to make a database call every time I want a new UUID.  I didn&#8217;t find any similar functionality in [...]]]></description>
			<content:encoded><![CDATA[<p>In my desire to find the &#8220;right&#8221; <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" target="_self">UUID</a> function to use in my application, I grew to like the <a href="http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html#function_uuid" target="_self">MySQL UUID()</a> results produced because they are partially time based.  But I didn&#8217;t like that I have to make a database call every time I want a new UUID.  I didn&#8217;t find any similar functionality in PHP or from user based PHP functions, so here&#8217;s my efforts.</p>
<p>It clocks in at 100,000 results in about 1.36 seconds on my 2.8Ghz Intel iMac.</p>
<p><script src="http://gist.github.com/365502.js?file=time-based-uuid.php"></script></p>
<p>We produce results looking like this:<br />
<script src="http://gist.github.com/365502.js?file=results"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://drewjoh.com/blog/2009/07/php-time-based-uuid-function-guid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting Ticks to a Timestamp</title>
		<link>http://drewjoh.com/blog/2009/05/converting-ticks-to-a-timestamp/</link>
		<comments>http://drewjoh.com/blog/2009/05/converting-ticks-to-a-timestamp/#comments</comments>
		<pubDate>Sat, 02 May 2009 21:12:39 +0000</pubDate>
		<dc:creator>Drew</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[ticks]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://drewjoh.com/blog/?p=57</guid>
		<description><![CDATA[I recently had to deal with a SQLite database that stored the timestamps as ticks.  Having to first research what a tick is, I created a simple function that will convert a tick value to a timestamp or MySQL datetime value since I couldn&#8217;t find anyone else who had done such a thing yet. You [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to deal with a SQLite database that stored the timestamps as ticks.  Having to first <a href="http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx">research </a>what a <a href="http://www.flickr.com/photos/eastpole/2299787549/">tick is</a>, I created a simple function that will convert a tick value to a timestamp or MySQL datetime value since I couldn&#8217;t find anyone else who had done such a thing yet.</p>
<p>You can <a href="http://drewjoh.com/downloads/ticks_to_timestamp.zip">download it here</a> or view it below.</p>
<p>The only tricky part (aside from figuring out what a tick is) was calculating the number of ticks between 0001-01-01 to 1970-01-01. Also of note: a tick is apparently a popular way to store date/time values for Microsoft.</p>
<p><script src="http://gist.github.com/597458.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://drewjoh.com/blog/2009/05/converting-ticks-to-a-timestamp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Serving a large file through PHP without hitting memory_limit</title>
		<link>http://drewjoh.com/blog/2008/09/serving-a-large-file-through-php-without-hitting-memory_limit/</link>
		<comments>http://drewjoh.com/blog/2008/09/serving-a-large-file-through-php-without-hitting-memory_limit/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 05:44:15 +0000</pubDate>
		<dc:creator>Drew</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://drewjoh.com/blog/?p=34</guid>
		<description><![CDATA[Ran into a little problem hitting the memory limit for PHP when serving 100MB+ files through a script like: Found that you need to call ob_flush() as well as flush() since flush() has no effect on the buffering scheme of your web server. Just thought I&#8217;d throw that out there for anyone else.]]></description>
			<content:encoded><![CDATA[<p>Ran into a little problem hitting the memory limit for PHP when serving 100MB+ files through a script like:</p>
<p><script src="http://gist.github.com/365509.js?file=serving-large-file.php"></script></p>
<p>Found that you need to call ob_flush() as well as flush() since flush() has <a href="http://us3.php.net/manual/en/function.flush.php">no effect on the buffering scheme of your web server</a>.</p>
<p>Just thought I&#8217;d throw that out there for anyone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://drewjoh.com/blog/2008/09/serving-a-large-file-through-php-without-hitting-memory_limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
