<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for evardsson.com: stuff that w0rks</title>
	<atom:link href="http://www.evardsson.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evardsson.com/blog</link>
	<description>tweaks and hacks, php, python, music, home and ???</description>
	<lastBuildDate>Mon, 02 Jul 2012 00:45:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Comment on PHP Singleton? Not really by C</title>
		<link>http://www.evardsson.com/blog/2010/12/07/php-singleton-not-really/comment-page-1/#comment-3942</link>
		<dc:creator>C</dc:creator>
		<pubDate>Mon, 02 Jul 2012 00:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=425#comment-3942</guid>
		<description><![CDATA[That&#039;s nice ! I intend to use it in some project of my own.

I cannot discuss here the details, however we could keep in touch about this topic.

I also was in need to increment some counter, and to harvest some argument from a database or file, in order to use it later in a webpage. 

I&#039;d like to chat with you about this thing, maybe we could even get involved in that project.

Thank you !]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s nice ! I intend to use it in some project of my own.</p>
<p>I cannot discuss here the details, however we could keep in touch about this topic.</p>
<p>I also was in need to increment some counter, and to harvest some argument from a database or file, in order to use it later in a webpage. </p>
<p>I&#8217;d like to chat with you about this thing, maybe we could even get involved in that project.</p>
<p>Thank you !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Comparing PHP array_shift to array_pop by Danny</title>
		<link>http://www.evardsson.com/blog/2010/02/05/comparing-php-array_shift-to-array_pop/comment-page-1/#comment-3294</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Thu, 28 Jun 2012 23:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=390#comment-3294</guid>
		<description><![CDATA[Nice article. It makes sense though that the array_shift would use much time like you said, the array needs to be re-arranged each time. Hey, I thought the script would contain the script to produce that chart!]]></description>
		<content:encoded><![CDATA[<p>Nice article. It makes sense though that the array_shift would use much time like you said, the array needs to be re-arranged each time. Hey, I thought the script would contain the script to produce that chart!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Try out Chrome OS in a VM &#8211; even Parallels! by Len Popat</title>
		<link>http://www.evardsson.com/blog/2009/11/21/try-out-chrome-os-in-a-vm-even-parallels/comment-page-1/#comment-1713</link>
		<dc:creator>Len Popat</dc:creator>
		<pubDate>Thu, 08 Mar 2012 04:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=384#comment-1713</guid>
		<description><![CDATA[Trackback
[...] We stumbled over here coming from a different website and thought I should check things [...]]]></description>
		<content:encoded><![CDATA[<p>Trackback<br />
[...] We stumbled over here coming from a different website and thought I should check things [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fix for firehol get-iana script by Alex</title>
		<link>http://www.evardsson.com/blog/2010/06/28/fix-for-firehol-get-iana-script/comment-page-1/#comment-1688</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 09 Jan 2012 14:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=404#comment-1688</guid>
		<description><![CDATA[Thank you!]]></description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Useful custom 403 and 404 error pages with PHP by Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/comment-page-1/#comment-1507</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Sun, 11 Sep 2011 16:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/#comment-1507</guid>
		<description><![CDATA[Very true, if you are not using the Apache built-in custom error page behavior. (Apache will set the proper headers when you are.)

In cases where you are using mod_rewrite to point everything to an app (like WordPress and others) you want to make sure that your error pages do set the proper error code in the header.]]></description>
		<content:encoded><![CDATA[<p>Very true, if you are not using the Apache built-in custom error page behavior. (Apache will set the proper headers when you are.)</p>
<p>In cases where you are using mod_rewrite to point everything to an app (like WordPress and others) you want to make sure that your error pages do set the proper error code in the header.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Useful custom 403 and 404 error pages with PHP by Svante</title>
		<link>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/comment-page-1/#comment-1506</link>
		<dc:creator>Svante</dc:creator>
		<pubDate>Sun, 11 Sep 2011 09:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/#comment-1506</guid>
		<description><![CDATA[Don&#039;t forget to include the error code in the header! A simple header(&quot;HTTP/1.0 404 Not Found&quot;) at the beginning of the custom 404 document would do.]]></description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget to include the error code in the header! A simple header(&#8220;HTTP/1.0 404 Not Found&#8221;) at the beginning of the custom 404 document would do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Try out Chrome OS in a VM &#8211; even Parallels! by Rob</title>
		<link>http://www.evardsson.com/blog/2009/11/21/try-out-chrome-os-in-a-vm-even-parallels/comment-page-1/#comment-1504</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Mon, 29 Aug 2011 07:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=384#comment-1504</guid>
		<description><![CDATA[If you&#039;re using Parallels on Mac you can download a Chromium OS image directly from them. Very easy.]]></description>
		<content:encoded><![CDATA[<p>If you&#8217;re using Parallels on Mac you can download a Chromium OS image directly from them. Very easy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by HTTP File Upload Libcurl - Page 2</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1335</link>
		<dc:creator>HTTP File Upload Libcurl - Page 2</dc:creator>
		<pubDate>Thu, 21 Jul 2011 03:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1335</guid>
		<description><![CDATA[[...] 1,797          You&#039;re trying to do an HTTP PUT to an Apache server. I don&#039;t believe that Apache supports PUT out of the box, hence the &quot;Method not allowed&quot; error. You need to properly configure Apache to support PUT. Here&#039;s one link to that end. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 1,797          You&#039;re trying to do an HTTP PUT to an Apache server. I don&#039;t believe that Apache supports PUT out of the box, hence the &quot;Method not allowed&quot; error. You need to properly configure Apache to support PUT. Here&#039;s one link to that end. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1312</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Sun, 17 Jul 2011 17:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1312</guid>
		<description><![CDATA[Sure thing. This is a test script that just spits back your request. I am sure you can see how to extend this to pass the data through to your API. Cheers.
&lt;pre&gt;
 &lt;?php
$key = ($_REQUEST[&#039;apikey&#039;])?$_REQUEST[&#039;apikey&#039;]:&#039;&#039;;
function getHeaders()
{
	$headers = array();
	if (function_exists(&#039;apache_request_headers&#039;))
	{
		$headers = apache_request_headers();
	}
	else
	{
		foreach ($_SERVER as $k =&gt; $v)
		{
			if (substr($k, 0, 5) == &quot;HTTP_&quot;)
			{
				$k = str_replace(&#039; &#039;, &#039;-&#039;, str_replace(&#039;_&#039;, &#039; &#039;, ucwords(strtolower(substr($k, 5)))));
				$headers[$k] = $v;
			}
		}
	}
	return $headers;
}
$verb = strtolower($_SERVER[&#039;REQUEST_METHOD&#039;]);
$data	= array();
switch ($verb)
{
	case &#039;get&#039;:
		$data = $_GET;
		break;
	case &#039;post&#039;:
		$data = $_POST;
		break;
	case &#039;put&#039;:
		parse_str(file_get_contents(&#039;php://input&#039;), $put_data);
		$data = $put_data;
		break;
}

print &lt;&lt;&lt;EOD1
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;&lt;pre&gt;
&lt;b&gt;Request:&lt;/b&gt;


EOD1;
print_r($_REQUEST);

echo &quot;\n\n&lt;b&gt;Headers:&lt;/b&gt;\n\n&quot;;
print_r(getHeaders());

echo &quot;\n\n&lt;b&gt;Verb:&lt;/b&gt;\n\n&quot;;
print_r($verb);

echo &quot;\n\n&lt;b&gt;Data:&lt;/b&gt;\n\n&quot;;
print_r($data);
print &lt;&lt;&lt;EOD
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;

EOD;
?&gt;]]></description>
		<content:encoded><![CDATA[<p>Sure thing. This is a test script that just spits back your request. I am sure you can see how to extend this to pass the data through to your API. Cheers.</p>
<pre>
 &lt;?php
$key = ($_REQUEST['apikey'])?$_REQUEST['apikey']:'';
function getHeaders()
{
	$headers = array();
	if (function_exists('apache_request_headers'))
	{
		$headers = apache_request_headers();
	}
	else
	{
		foreach ($_SERVER as $k => $v)
		{
			if (substr($k, 0, 5) == "HTTP_")
			{
				$k = str_replace(' ', '-', str_replace('_', ' ', ucwords(strtolower(substr($k, 5)))));
				$headers[$k] = $v;
			}
		}
	}
	return $headers;
}
$verb = strtolower($_SERVER['REQUEST_METHOD']);
$data	= array();
switch ($verb)
{
	case 'get':
		$data = $_GET;
		break;
	case 'post':
		$data = $_POST;
		break;
	case 'put':
		parse_str(file_get_contents('php://input'), $put_data);
		$data = $put_data;
		break;
}

print &lt;&lt;&lt;EOD1
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;&lt;pre&gt;
&lt;b&gt;Request:&lt;/b&gt;


EOD1;
print_r($_REQUEST);

echo "\n\n&lt;b&gt;Headers:&lt;/b&gt;\n\n";
print_r(getHeaders());

echo "\n\n&lt;b&gt;Verb:&lt;/b&gt;\n\n";
print_r($verb);

echo "\n\n&lt;b&gt;Data:&lt;/b&gt;\n\n";
print_r($data);
print &lt;&lt;&lt;EOD
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;

EOD;
?&gt;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by ramzez</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1311</link>
		<dc:creator>ramzez</dc:creator>
		<pubDate>Fri, 08 Jul 2011 11:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1311</guid>
		<description><![CDATA[Can you make put.php script make available? thanks!]]></description>
		<content:encoded><![CDATA[<p>Can you make put.php script make available? thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
