<?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>Chris McKee&#187; PHP</title>
	<atom:link href="http://chrismckee.co.uk/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrismckee.co.uk</link>
	<description></description>
	<lastBuildDate>Tue, 19 Mar 2013 01:19:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Handling TripleDES (ECB with PKCS5Padding) in PHP</title>
		<link>http://chrismckee.co.uk/handling-tripledes-ecb-pkcs5padding-php/</link>
		<comments>http://chrismckee.co.uk/handling-tripledes-ecb-pkcs5padding-php/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 19:33:57 +0000</pubDate>
		<dc:creator>Chris McKee</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ECB]]></category>
		<category><![CDATA[Handling TripleDES ECB PKCS5Padding in PHP]]></category>
		<category><![CDATA[PKCS5Padding]]></category>
		<category><![CDATA[TripleDES]]></category>

		<guid isPermaLink="false">http://chrismckee.co.uk/?p=661</guid>
		<description><![CDATA[I came across an issue a few years back that I was supposed to post about there and then; what the hey no buggers bothered to fix it. Basically PHP &#8211; MCrypt is great, it handles lots of nice encryption algorithms very simply and provides just the right amount of abstraction to the user to&#160;<a href="http://chrismckee.co.uk/handling-tripledes-ecb-pkcs5padding-php/">&#8230; Read on Squire</a>]]></description>
				<content:encoded><![CDATA[<p>I came across an issue a few years back that I was supposed to post about there and then; what the hey no buggers bothered to fix it.</p>
<p>Basically PHP &#8211; MCrypt is great, it handles lots of nice encryption algorithms very simply and provides just the right amount of abstraction to the user to make it usable.</p>
<p>What it doesn&#8217;t do is handle all of the regularly used encryption standards used by say Java (think Apache Tomcat) or .Net (IIS/Mono); one of the main one of these being TripleDES (<abbr title="Electronic Codebook">ECB</abbr> with PKCS5 Padding). It WILL handle TripleDES on its own, the important bit is the ECB-PKCS5 Padding, as without this a message size and form is different and subsequently any attempt to decrypt that message will return junk.</p>
<p>I wont go into boring detail about the encryption as I expect most of you who came here came just for the code and have copied-pasted and left <img src='http://chrismckee.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So here&#8217;s the code&hellip;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> encrypt<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #339933;">,</span><span style="color: #000088;">$ky</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ky</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_get_block_size</span><span style="color: #009900;">&#40;</span>MCRYPT_TRIPLEDES<span style="color: #339933;">,</span> <span style="color: #0000ff;">'ecb'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$input</span> <span style="color: #339933;">=</span> pkcs5_pad<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$td</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_module_open</span><span style="color: #009900;">&#40;</span>MCRYPT_TRIPLEDES<span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ecb'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$iv</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_create_iv</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mcrypt_enc_get_iv_size</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> MCRYPT_RAND<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #990000;">mcrypt_generic_init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$iv</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_generic</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #339933;">,</span> <span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #990000;">mcrypt_generic_deinit</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #990000;">mcrypt_module_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//push it out so i can check it works</span>
   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> decrypt<span style="color: #009900;">&#40;</span><span style="color: #000088;">$crypt</span><span style="color: #339933;">,</span><span style="color: #000088;">$ky</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$crypt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urldecode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crypt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$crypt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crypt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ky</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$td</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_module_open</span> <span style="color: #009900;">&#40;</span>MCRYPT_TRIPLEDES<span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ecb'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$iv</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mcrypt_create_iv</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mcrypt_enc_get_iv_size</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> MCRYPT_RAND<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mcrypt_generic_init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$iv</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$decrypted_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mdecrypt_generic</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #339933;">,</span> <span style="color: #000088;">$crypt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mcrypt_generic_deinit</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mcrypt_module_close</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$td</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$decrypted_data</span> <span style="color: #339933;">=</span> pkcs5_unpad<span style="color: #009900;">&#40;</span><span style="color: #000088;">$decrypted_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$decrypted_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rtrim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$decrypted_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$decrypted_data</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> pkcs5_pad<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$blocksize</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$pad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$blocksize</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">%</span> <span style="color: #000088;">$blocksize</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span> <span style="color: #339933;">.</span> <span style="color: #990000;">str_repeat</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pad</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pad</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> pkcs5_unpad<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$pad</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ord</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#123;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pad</span> <span style="color: #339933;">&gt;</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$pad</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Quick Test</span>
<span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ZEjygIuripyRcusWBBlyWZz='</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Sometimes a little encryption is better than none&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;b&gt;String:&lt;/b&gt; <span style="color: #006699; font-weight: bold;">$x</span> &lt;br&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">&quot;&lt;b&gt;Encrypted:&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$testd</span> <span style="color: #339933;">=</span> encrypt<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$testd</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">&quot;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Decrypt&lt;/b&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> decrypt<span style="color: #009900;">&#40;</span><span style="color: #000088;">$testd</span><span style="color: #339933;">,</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$d</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h2>To make myself happy here&#8217;s a pretty picture of Electronic codebook (ECB)</h2>
<p><a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29" title="takes you to wikipedia article on ECB"><img src="http://upload.wikimedia.org/wikipedia/commons/c/c4/Ecb_encryption.png" /></a><br />
<small>source http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29</small></p>
<p>
And here&#8217;s a little bit on this encryption. Basically put the block cipher requires input that is an exact multiple of the block size; so If the input buffer is not a multiple of the block size, it must be padded to fill up the last block, here&#8217;s where padding comes into play. This form of encryptions not bad, I probably wouldn&#8217;t feel comfortable keeping my bank details in it but it was good enough for the nice people at a very large crisp company to use as to authenticate all its discounts in a large British campaign. </p>
<h3>There&#8217;s a fair bit on this and the padding:</h3>
<ul>
<li>http://www.di-mgt.com.au/cryptopad.html#whennopadding</li>
<li>http://www.ietf.org/rfc/rfc3369.txt</li>
<li>http://www.haskell.org/crypto/doc/html/Codec-Encryption-Padding.html#v%3Apkcs5</li>
</ul>
<p><a class="large orange button" href="/labs/php/tripledesencryptiontest.php" rel="nofollow">Demo</a></p>
<p><a class="large orange button"  href="/labs/php/tripledesencryptiontest.phps" rel="nofollow">Download Code Source</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://chrismckee.co.uk/handling-tripledes-ecb-pkcs5padding-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Curl HTTP 417 &#8211; Expectation Failed</title>
		<link>http://chrismckee.co.uk/curl-http-417-expectation-failed/</link>
		<comments>http://chrismckee.co.uk/curl-http-417-expectation-failed/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 10:30:50 +0000</pubDate>
		<dc:creator>Chris McKee</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[417 - Expectation Failed]]></category>
		<category><![CDATA[CURL]]></category>
		<category><![CDATA[Error 417]]></category>
		<category><![CDATA[HTTP/1.1 417 Expectation Failed]]></category>
		<category><![CDATA[PHP-CURL]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://chrismckee.co.uk/?p=216</guid>
		<description><![CDATA[<p>I was nocking up a client script to drag down a news-feed and post it to a Wordpress blog; the script ran fine, no posts appeared and no errors occurred&#8230; irritating.</p><p>So I figured I'd share this pain in the arse issue fix to the "HTTP/1.1 417 Expectation Failed Error"</p>]]></description>
				<content:encoded><![CDATA[<h2>WordPress XML RPC &#8211; HTTP/1.1 417 Expectation Failed</h2>
<p>I was nocking up a client script to drag down a news-feed and post it to a WordPress blog; the script ran fine, no posts appeared and no errors occurred&hellip; irritating.</p>
<p></p>
<p>So I figured I&#8217;d share this pain in the arse issue fix to the &#8220;HTTP/1.1 417 Expectation Failed Error&#8221;<br />
<strong>HTTP/1.1 417 Expectation Failed</strong></p>
<p></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$title</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Test&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$body</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;b&gt;Test&lt;/b&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$rpcurl</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://domain.tld/xmlrpc.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$username</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$password</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$category</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;test&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$keywords</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;test&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$encoding</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_NOQUOTES</span><span style="color: #339933;">,</span><span style="color: #000088;">$encoding</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$keywords</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_NOQUOTES</span><span style="color: #339933;">,</span><span style="color: #000088;">$encoding</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
	<span style="color: #0000ff;">'title'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span> 
	<span style="color: #0000ff;">'description'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$body</span><span style="color: #339933;">,</span> 
	<span style="color: #0000ff;">'mt_allow_comments'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// 1 pour autoriser les commentaires</span>
	<span style="color: #0000ff;">'mt_allow_pings'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// 1 pour autoriser les trackbacks</span>
	<span style="color: #0000ff;">'post_type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span> 
	<span style="color: #0000ff;">'mt_keywords'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$keywords</span><span style="color: #339933;">,</span> 
	<span style="color: #0000ff;">'categories'</span><span style="color: #339933;">=&gt;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span><span style="color: #000088;">$password</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$request</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xmlrpc_encode_request</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'metaWeblog.newPost'</span><span style="color: #339933;">,</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_VERBOSE<span style="color: #339933;">,</span> <span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// DEBUG OUTPUT - Turn this off for your live script (comment out)</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPHEADER<span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Expect:'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Fixes the HTTP/1.1 417 Expectation Failed Bug</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$request</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$rpcurl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$results</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Or as a function</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wpPostXMLRPC<span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #000088;">$body</span><span style="color: #339933;">,</span><span style="color: #000088;">$rpcurl</span><span style="color: #339933;">,</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span><span style="color: #000088;">$password</span><span style="color: #339933;">,</span><span style="color: #000088;">$category</span><span style="color: #339933;">,</span><span style="color: #000088;">$keywords</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #000088;">$encoding</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_NOQUOTES</span><span style="color: #339933;">,</span><span style="color: #000088;">$encoding</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$keywords</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_NOQUOTES</span><span style="color: #339933;">,</span><span style="color: #000088;">$encoding</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'title'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'description'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$body</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'mt_allow_comments'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// 1 to allow comments</span>
        <span style="color: #0000ff;">'mt_allow_pings'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// 1 to allow trackbacks</span>
        <span style="color: #0000ff;">'post_type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'mt_keywords'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$keywords</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'categories'</span><span style="color: #339933;">=&gt;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span><span style="color: #000088;">$password</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$request</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xmlrpc_encode_request</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'metaWeblog.newPost'</span><span style="color: #339933;">,</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$request</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPHEADER<span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Expect:'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Fixes the HTTP/1.1 417 Expectation Failed Bug</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$rpcurl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$results</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p></p>
<p>Just to expand, checkupdown defines the error as follows</p>
<blockquote><p>Your Web server thinks that the HTTP data stream sent by the client (e.g. CURL) contains a &#8216;Expect&#8217; request which can not be satisfied. The Expect request is fairly generic i.e. loosely defined in the HTTP protocol. It can specify more than one expectation, each of which may be interpreted differently by different Web servers.</p></blockquote>
<p><small>CUD: http://bit.ly/Error417</small></p>
<p>Hopefully that will save someone banging their frickin skull on the wall</p>
<p>Chris</p>
<p><small>http://bit.ly/Original-Source-of-Funtion-Prior-to-Fix</small></p>
]]></content:encoded>
			<wfw:commentRss>http://chrismckee.co.uk/curl-http-417-expectation-failed/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Saving user content to XML aka How to Remove Invalid Characters in UTF-8</title>
		<link>http://chrismckee.co.uk/saving-user-content-to-xml-error-contains-none-utf-8-content-aka-how-to-remove-invalid-characters-in-utf-8/</link>
		<comments>http://chrismckee.co.uk/saving-user-content-to-xml-error-contains-none-utf-8-content-aka-how-to-remove-invalid-characters-in-utf-8/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 08:58:26 +0000</pubDate>
		<dc:creator>Chris McKee</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[convert html]]></category>
		<category><![CDATA[html entities]]></category>
		<category><![CDATA[invalid characters errror]]></category>
		<category><![CDATA[PHP 5.2]]></category>
		<category><![CDATA[utf-8]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://chrismckee.co.uk/?p=150</guid>
		<description><![CDATA[Error Contains None UTF-8 Content&#8230; Bleh When encoding use content to XML there are often issues that occur&#8230; 99.9% of the time stemming from users copy-pasting from MSWord in to text boxes and all the odd characters being carried through. PHP will play dumb and happily save this, then winge like a b&#8217;tch about displaying&#160;<a href="http://chrismckee.co.uk/saving-user-content-to-xml-error-contains-none-utf-8-content-aka-how-to-remove-invalid-characters-in-utf-8/">&#8230; Read on Squire</a>]]></description>
				<content:encoded><![CDATA[<h2>Error Contains None UTF-8 Content&hellip; Bleh</h2>
<p>When encoding use content to XML there are often issues that occur&#8230; 99.9% of the time stemming from users copy-pasting from MSWord in to text boxes and all the odd characters being carried through. PHP will play dumb and happily save this, then winge like a b&#8217;tch about displaying it.
</p>
<p>
A few quickfixes on saving the content are as follows&hellip;
</p>
<p>
Us your constructing your document as follows (simple example)</p>
<p><code></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$root</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'articles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$root</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">appendChild</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$root</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #666666; font-style: italic;">//...</span>
       <span style="color: #666666; font-style: italic;">/* When you get to your body text (i.e the user entered bit) */</span>
      	<span style="color: #666666; font-style: italic;">//BODY</span>
	<span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mybodytext'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$root</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">appendChild</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$bodytext</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bodytext'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Take the post Data</span>
	<span style="color: #000088;">$bodytext</span> <span style="color: #339933;">=</span> <span style="color: #990000;">iconv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;UTF-8//IGNORE&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$bodytext</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* This will Convert the string to the requested character encoding and strip all of the none-utf-8 characters (http://uk3.php.net/manual/en/function.iconv.php */</span>
&nbsp;
	<span style="color: #000088;">$bodytext</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bodytext</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* Standard Convert HTML entities */</span>
	<span style="color: #000088;">$cdata</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createCDATASection</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bodytext</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* Stick it in a CDATA (as their could be all sorts of stuff in there*/</span>
	<span style="color: #000088;">$body</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">appendChild</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cdata</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">//... Rest of your Content + Save</span></pre></td></tr></table></div>

<p></code></p>
<p>
As well as this there is also</p>
<p><code></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">mb_convert_encoding</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'HTML-ENTITIES'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p></code></p>
<p>Which offers similar functionality (http://us2.php.net/manual/en/function.mb-convert-encoding.php) as the above will allow you to convert string from ISO to UTF8.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrismckee.co.uk/saving-user-content-to-xml-error-contains-none-utf-8-content-aka-how-to-remove-invalid-characters-in-utf-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Converting a Date to MySql Formatted Date</title>
		<link>http://chrismckee.co.uk/converting-a-date-to-mysql-formatted-date/</link>
		<comments>http://chrismckee.co.uk/converting-a-date-to-mysql-formatted-date/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 01:03:28 +0000</pubDate>
		<dc:creator>Chris McKee</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[dateconvert]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[explode]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php4]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://chrismckee.co.uk/?p=26</guid>
		<description><![CDATA[Date-Convert is a handy function to take one of the aches and pains out of MySQL by converting data from a variable (posted from a form or just stored) into a format mysql will be able to store and converting the database date back into the british standard of date month year.]]></description>
				<content:encoded><![CDATA[<h2>Converting a Date to mySql Formatted Date</h2>
<p><em>[REPUBLISHED FROM OLD SITE]</em></p>
<p><em></em><br />
This is a php coded function provided to allow people to convert dates from standard input format to mysql storage format.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">/** 
* function dateconvert 
* 
* dateconvert is a handy function to take one of the aches and pains out of mysql
* by converting data from a variable (posted from a form or just stored) 
* into a format mysql will be able to store and converting the 
* database date back into the british standard of date month year.
* The Script accepts day.month.year or day/month/year or day-month-year. 
* example:
* 
*
* $date = &quot;19.12.2005&quot;;
* $date = dateconvert($date, 1);
* echo $date; // Would echo 2005-12-19 which is the format stored by mysql
* 
* 
*<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #339933;">*</span>  	<span style="color: #000088;">$date</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'date'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//your mysql date</span>
<span style="color: #339933;">*</span>	<span style="color: #000088;">$realdate</span> <span style="color: #339933;">=</span> dateconvert<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">*</span>	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$realdate</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// would display 19/12/2005 </span>
<span style="color: #339933;">*</span><span style="color: #000000; font-weight: bold;">?&gt;</span> 
* 
* 
* @author Chris McKee - pcdevils@gmail.com 
* 
* @param string $date - Date to be converted
* @param string $func - which function is to be used (1 for input to mysql, 2 for output from mysql)
*/ 
function dateconvert($date,$func) {
  	if ($func == 1){ //insert conversion
  	list($day, $month, $year) = split('[/.-]', $date); 
  	$date = &quot;$year-$month-$day&quot;; 
 	return $date;
}
if ($func == 2){ //output conversion
  	list($year, $month, $day) = split('[-.]', $date); 
  	$date = &quot;$day/$month/$year&quot;; 
 	return $date;
}
&nbsp;
}</pre></td></tr></table></div>

<p>*** NOTE ***<br />
This is a bit old (PHP4) but feel free to use. Works in PHP5 too.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrismckee.co.uk/converting-a-date-to-mysql-formatted-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
