<?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>david winter &#187; http</title>
	<atom:link href="http://davidwinter.me.uk/articles/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidwinter.me.uk</link>
	<description>you were expecting someone else?</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>A simple PHP delicious REST example with pecl_http</title>
		<link>http://davidwinter.me.uk/articles/2008/11/24/a-simple-php-pecl_http-example-with-delicious/</link>
		<comments>http://davidwinter.me.uk/articles/2008/11/24/a-simple-php-pecl_http-example-with-delicious/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:39:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[pecl_http]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=119</guid>
		<description><![CDATA[&#60;?php $username = 'your_username'; $password = 'your_password'; $url = "https://$username:$password@api.del.icio.us/v1/posts/recent"; $request = new HttpRequest($url, HTTP_METH_GET); $response = $request-&#62;send(); print $response-&#62;getBody(); ?&#62; You&#8217;ll probably need to view the source in your browser to see the output. The second argument isn&#8217;t required in this call, because HttpRequest defaults to a GET request anyway, but it&#8217;s just helpful [...]]]></description>
			<content:encoded><![CDATA[<pre><code>&lt;?php

$username = 'your_username';
$password = 'your_password';
$url = "https://$username:$password@api.del.icio.us/v1/posts/recent";

$request = new HttpRequest($url, HTTP_METH_GET);
$response = $request-&gt;send();
print $response-&gt;getBody();
?&gt;
</code></pre>

<p>You&#8217;ll probably need to view the source in your browser to see the output.</p>

<p>The second argument isn&#8217;t required in this call, because <code>HttpRequest</code> defaults to a <code>GET</code> request anyway, but it&#8217;s just helpful to see where you can specify the different HTTP methods. The others being, post, put and delete.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/11/24/a-simple-php-pecl_http-example-with-delicious/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install pecl_http for PHP</title>
		<link>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/</link>
		<comments>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:33:41 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pecl_http]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=117</guid>
		<description><![CDATA[You will probably want to ensure that curl supports https before getting underway: curl -V Check that the output contains https: &#62;: curl -V curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3 Protocols: tftp ftp telnet dict http file https ftps Features: Largefile NTLM SSL libz If it doesn&#8217;t: sudo port deactivate curl sudo port install curl [...]]]></description>
			<content:encoded><![CDATA[<p>You will probably want to ensure that <code>curl</code> supports <code>https</code> before getting underway:</p>

<pre><code>curl -V
</code></pre>

<p>Check that the output contains <code>https</code>:</p>

<pre><code>&gt;: curl -V
curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3
Protocols: tftp ftp telnet dict http file https ftps 
Features: Largefile NTLM SSL libz
</code></pre>

<p>If it doesn&#8217;t:</p>

<pre><code>sudo port deactivate curl
sudo port install curl +ssl
</code></pre>

<p>Once you have <code>curl</code> with <code>https</code> support:</p>

<pre><code>sudo pecl install pecl_http
</code></pre>

<p>If you followed my previous <a href="/articles/2008/11/22/php5-lighttpd-and-imagick-on-mac-os-x-leopard/">howto</a>, you&#8217;ll want to move the module to the location specified in your <code>php.ini</code> file:</p>

<pre><code>sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20060613/http.so /opt/local/lib/php/extensions
</code></pre>

<p>Restart <code>lighttpd</code> and then you&#8217;ll be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
