<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DAN FOLKES &#187; PHP</title>
	<atom:link href="http://danfolkes.com/index.php/category/code/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://danfolkes.com</link>
	<description>programmers blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:58:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel="next" href="http://danfolkes.com/index.php/category/code/php/feed/?page=2" />

		<item>
		<title>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</title>
		<link>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/</link>
		<comments>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:57:31 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[?callback]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[available]]></category>
		<category><![CDATA[callbackName]]></category>
		<category><![CDATA[cross site]]></category>
		<category><![CDATA[cross site script]]></category>
		<category><![CDATA[dataType]]></category>
		<category><![CDATA[dataType: jsonp]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[External]]></category>
		<category><![CDATA[External Domain]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery.ajax]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[JSONP]]></category>
		<category><![CDATA[jsonpCallback]]></category>
		<category><![CDATA[onJSONPLoad]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[Webservice]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1482</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain. This allows [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/">PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX</a></p>
<p>OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain.  This allows your webservice to be available too whoever wants to call it.</p>
<p>Here is the PHP Code: (Not all of it, but enough to get the idea)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//http://SERVER_domain.com/webservice.php</span>
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GetTriviaTag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">triviaid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'triviaid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tagid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tagid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM trivia_tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTriviaTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$where</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; (1 = 1)&quot;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// THIS WILL SELECT ALL</span>
<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//OUTPUT JSON:</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'callback'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// &lt;-- THIS IS IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And now, to access it from javascript in an external domain (non &#8211; SERVER_domain.com ):</p>
<p>http://CLIENT_domain.com/Test.html:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Test<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://code.jquery.com/jquery-latest.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;triviaQuestions&quot;</span><span style="color: #339933;">&gt;</span> loading<span style="color: #339933;">...</span> <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// THE 'callback=?' in this request is IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
				$<span style="color: #339933;">.</span>getJSON<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://SERVER_domain.com/webservice.php&amp;callback=?'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					$<span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">key</span><span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						htmlResult <span style="color: #339933;">+=</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;Q: &quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>id <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>question <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#triviaQuestions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>html<span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
	<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</title>
		<link>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/</link>
		<comments>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 15:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[application/json]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Content-type]]></category>
		<category><![CDATA[Content-type: application/json]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[Request]]></category>
		<category><![CDATA[Response]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1470</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a Web Service using JSONP from External Domain – PHP – JQuery The HTML that calls the Javascript: &#60;div id=&#34;taglist&#34;&#62;&#60;/div&#62; &#60;input name=&#34;searchTags&#34; id=&#34;searchTags&#34; type=&#34;text&#34; /&#62; &#60;input type=&#34;button&#34; name=&#34;searchtags&#34; onclick=&#34;getTags()&#34; value=&#34;search&#34;/&#62; &#60;div id=&#34;tagresult&#34;&#62; &#60;/div&#62; The JavaScript (JQuery) AJAX Request and Response Processing: function getTags&#40;&#41; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/">Web Service using JSONP from External Domain – PHP – JQuery</a></p>
<p>The HTML that calls the Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;taglist&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchtags&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;getTags()&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;search&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagresult&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p><strong>The JavaScript </strong>(JQuery) AJAX Request and Response Processing:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> getTags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#searchTags'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ws.php?type=tag&amp;wN=name&amp;wO=like&amp;wV='</span> <span style="color: #339933;">+</span> q<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
			$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>key<span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">//As you can see, you can access the JSON (at the bottom of the page) by doing val.PROPERTYNAME:</span>
				htmlResult <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;br /&gt;Add : &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>#<span style="color: #000099; font-weight: bold;">\&quot;</span> onclick=<span style="color: #000099; font-weight: bold;">\&quot;</span>addTag(&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">id</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'); return false;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tagresult'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>PHP Code</strong> that returns JSON in the PHP file called by the AJAX: (ws.php)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$ta</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TagAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ta</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTagsWhere</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; <span style="color: #006699; font-weight: bold;">{$whereName}</span> LIKE '%<span style="color: #006699; font-weight: bold;">{$whereVariable}</span>%'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span>  <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The GetTagsWhere Helper Function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetTagsWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
    	<span style="color: #666666; font-style: italic;">// THE PDO Object was created previously</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>JSON</strong> Returned:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;4&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;NON-FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; NON-FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Simple PHP Pseudo Proxy</title>
		<link>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/</link>
		<comments>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 11:51:56 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[PHP Proxy]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Simple PHP Proxy]]></category>
		<category><![CDATA[stream_get_contents]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1363</guid>
		<description><![CDATA[This is the code for a simple php pseudo proxy. If you are blocked by a firewall and google cache isn&#8217;t working for some reason. You can use a url with this php file in it: &#60;?php $filename = $_GET&#91;&#34;url&#34;&#93;; if &#40;isset&#40;$filename&#41;&#41; &#123; $handle = fopen&#40;$filename, &#34;rb&#34;&#41;; $contents = stream_get_contents&#40;$handle&#41;; print $contents; fclose&#40;$handle&#41;; &#125; else [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy.jpg" alt="php proxy simple pseudo" title="php_simple_fake_proxy" width="335" height="74" class="alignnone size-full wp-image-1364" /></p>
<p>This is the code for a simple php pseudo proxy.  If you are blocked by a firewall and google cache isn&#8217;t working for some reason.  You can use a url with this php file in it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">print</span> <span style="color: #000088;">$contents</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;form method=&quot;GET&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;url&quot; /&gt;&lt;input type=&quot;submit&quot;/&gt;
&lt;/form&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then you can go to where the url is hosted and try something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">index.php?url=http%3A%2F%2Fwww.last.fm%2Fuser%2Fdanfolkes%2Fcharts%3Frangetype%3D6month%26subtype%3Dartists</pre></div></div>



<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy-150x74.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy.jpg" medium="image">
			<media:title type="html">php_simple_fake_proxy</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy-150x74.jpg" />
		</media:content>
	</item>
		<item>
		<title>Facebook Website Integration &#8211; HTML</title>
		<link>http://danfolkes.com/2011/05/25/facebook-website-integration-html/</link>
		<comments>http://danfolkes.com/2011/05/25/facebook-website-integration-html/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:40:03 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[a website]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook app]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Feedburner]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[integrate]]></category>
		<category><![CDATA[integrate Facebook]]></category>
		<category><![CDATA[rss feed]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1310</guid>
		<description><![CDATA[To integrate Facebook on to a website without the use of a facebook app you need these things: Facebook Page RSS Feed (can be tricky) Feedburner Account (free,easy) (here) Once you have both of those things you can do this in feedburner: Add a new feed (your facebook url) Go to the publicize tab Go [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Permanent Link: Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/2011/05/25/facebook-website-integration-html/facebook-website-integration-%e2%80%93-html-3/" rel="attachment wp-att-1321"><img src="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2.jpg" alt="" title="Facebook-Website-Integration-–-HTML" width="400" height="252" class="alignnone size-full wp-image-1321" /></a><br />
To integrate Facebook on to a website without the use of a facebook app you need these things:</p>
<ul>
<li>Facebook Page RSS Feed (<a href="http://www.google.com/search?q=find+your+facebook+rss+feed&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t">can be tricky)</a></li>
<li>Feedburner Account (free,easy) (<a href="http://feedburner.google.com/">here</a>)</li>
</ul>
<p>Once you have both of those things you can do this in feedburner:</p>
<ul>
<li>Add a new feed (your facebook url)</li>
<li>Go to the publicize tab</li>
<li>Go to BuzzBoost</li>
<li>Sroll down and fill out the form, you will be given html code.</li>
<li>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro&quot; type=&quot;text/javascript&quot; &gt;&lt;/script&gt;
&lt;noscript&gt;&lt;p&gt;Subscribe to RSS headline updates from: 
&lt;a href=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates&quot;&gt;&lt;/a&gt;
&lt;br/&gt;Powered by FeedBurner&lt;/p&gt; 
&lt;/noscript&gt;</pre></div></div>

</li>
<li>Preview:<script src="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro" type="text/javascript" ></script><noscript>
<p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates"></a><br/>Powered by FeedBurner</p>
<p> </noscript></li>
</ul>
<p>And that&#8217;s it!<br />
You can now style it up a little bit with some CSS and stuff.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Permanent Link: Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/25/facebook-website-integration-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2.jpg" medium="image">
			<media:title type="html">Facebook-Website-Integration-–-HTML</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>PHP API &#8211; Google Calendar &#8211; Updating Visibility</title>
		<link>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/</link>
		<comments>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:02:15 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[ClientLogin]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[event.private]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[gcalendar]]></category>
		<category><![CDATA[Gdata]]></category>
		<category><![CDATA[http://schemas.google.com/g/2005#event.private]]></category>
		<category><![CDATA[http://www.google.com/calendar/feeds/default/private]]></category>
		<category><![CDATA[newEventQuery]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[save()]]></category>
		<category><![CDATA[setVisibility]]></category>
		<category><![CDATA[Visibility]]></category>
		<category><![CDATA[visibility->value]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend_Gdata]]></category>
		<category><![CDATA[Zend_Gdata_Calendar]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1053</guid>
		<description><![CDATA[The Privacy / Visibility Part: $event-&#62;visibility-&#62;value = &#34;http://schemas.google.com/g/2005#event.private&#34;; Here it is in context: require_once 'Zend/Gdata/Extension/Visibility.php'; require_once 'Zend/Loader.php'; Zend_Loader::loadClass&#40;'Zend_Gdata'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_AuthSub'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_ClientLogin'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_Calendar'&#41;; &#160; $user = 'GOOGLEUSERNAME@gmail.com'; $pass = 'GOOGLEPASSWORD'; $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar $client = Zend_Gdata_ClientLogin::getHttpClient&#40;$user,$pass,$service&#41;; &#160; function outputCalendarByURL&#40;$client,$url&#41; &#123; $retVal = false; $gdataCal = new Zend_Gdata_Calendar&#40;$client&#41;; $query = $gdataCal-&#62;newEventQuery&#40;&#41;; $query-&#62;setUser&#40;'default'&#41;; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Permanent Link: Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>The Privacy / Visibility Part:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here it is in context:<span id="more-1053"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Gdata/Extension/Visibility.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Loader.php'</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_AuthSub'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_ClientLogin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_Calendar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEUSERNAME@gmail.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEPASSWORD'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$service</span> <span style="color: #339933;">=</span> Zend_Gdata_Calendar<span style="color: #339933;">::</span><span style="color: #004000;">AUTH_SERVICE_NAME</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// predefined service name for calendar</span>
<span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> Zend_Gdata_ClientLogin<span style="color: #339933;">::</span><span style="color: #004000;">getHttpClient</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span><span style="color: #000088;">$pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$service</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> outputCalendarByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newEventQuery</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setUser</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'default'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setVisibility</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'private'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setProjection</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'full'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setOrderby</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'starttime'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//print_r($event);</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">when</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//print_r($when);</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Starts: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">startTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Ends: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">endTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Content: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Link: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>hidden<span style="color: #000099; font-weight: bold;">\&quot;</span> value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>eid<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$retVal</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Events New Title&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://www.google.com/calendar/feeds/default/private/full/URLOFeventFROMevent_ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Permanent Link: Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
	</item>
		<item>
		<title>Pitchfork &#039;Best New Albums&#039; Torrent Search</title>
		<link>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/</link>
		<comments>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 16:41:43 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=623</guid>
		<description><![CDATA[Ok so this might be slightly illegal, but I am really just generating some links. I wrote some code that will take the RSS feed from this page: http://pitchfork.com/reviews/best/albums/ and searches BTJunkie for torrents. Here it is in action: http://danfolkes.com/pitchfork_torrent_albums_best/ Here is the source: (also here) 1 2 3 4 5 6 7 8 9 [...]


Related posts:<ol><li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/pitchfork_torrent_albums_best/"><img src="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" alt="Pitchfork_Best_new_Music_BTJunkie_Search" title="Pitchfork_Best_new_Music_BTJunkie_Search" width="400" class="alignnone size-full" /></a></p>
<p>Ok so this might be slightly illegal, but I am really just generating some links.</p>
<p>I wrote some code that will take the RSS feed from this page: <a href="http://pitchfork.com/reviews/best/albums/">http://pitchfork.com/reviews/best/albums/</a> and searches BTJunkie for torrents.</p>
<blockquote><p><strong>Here it is in action:<br />
<a href="http://danfolkes.com/pitchfork_torrent_albums_best/">http://danfolkes.com/pitchfork_torrent_albums_best/</a></strong></p></blockquote>
<p>Here is the source: (also <a href="http://danfolkes.com/pitchfork_torrent_albums_best/source.txt">here</a>)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;table border=1&gt;&quot;</span><span style="color: #339933;">;</span>
  <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;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds2.feedburner.com/PitchforkBestNewAlbums'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;th colspan='2'&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$doc2</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;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://btjunkie.org/rss.xml?query=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/th&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' target='_blank'&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span><span style="color: #339933;">.=</span> <span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$link</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/td&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
  <span style="color: #666666; font-style: italic;">//print_r($arrFeeds);</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" medium="image">
			<media:title type="html">Pitchfork_Best_new_Music_BTJunkie_Search</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Base64_Encode &#8211; Intentionally screwing up pictures</title>
		<link>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/</link>
		<comments>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 20:48:18 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[base 64]]></category>
		<category><![CDATA[base 64 encode]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[fread]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[jpeg]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=608</guid>
		<description><![CDATA[So, I was a little bored so I made some PHP code. This is what it does: Takes query string values Pulls an image from the web base64_encodes it. Distorts the image. Replaces some of the base64 string data with other string data. Outputs the image in an img tag. Hope this helps someone, let [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='Permanent Link: YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_611" class="wp-caption alignnone" style="width: 650px"><a href="http://danfolkes.com/index.php/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/index/" rel="attachment wp-att-611"><img src="http://danfolkes.com/wp-content/uploads/2010/09/index.jpg" alt="A screwed up base64 image.  Replaced all of the 'da' with 'ha'" title="index" width="640" height="427" class="size-full wp-image-611" /></a><p class="wp-caption-text">A screwed up base64 image. Replaced all of the 'da' with 'ha'</p></div>
<p>So, I was a little bored so I made some PHP code.</p>
<p>This is what it does:</p>
<ul>
<li>Takes query string values</li>
<li>Pulls an image from the web</li>
<li>base64_encodes it.</li>
<li>Distorts the image.</li>
<li>Replaces some of the base64 string data with other string data.</li>
<li>Outputs the image in an img tag.</li>
</ul>
<p><b>Hope this helps someone, <em>let me know if it does IN THE COMMENTS</em></b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$find</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$replace</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$imgfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$imgfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_ireplace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$find</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replace</span><span style="color: #339933;">,</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;data:image/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$type</span><span style="color: #339933;">.</span><span style="color: #0000ff;">';base64,'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$start</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
		Try: &lt;a href='base64.php?i=http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;r=ha&amp;t=gif'&gt;http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;re=ha&amp;t=gif&lt;/a&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='Permanent Link: YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/index-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/09/index.jpg" medium="image">
			<media:title type="html">index</media:title>
			<media:description type="html">A screwed up base64 image.</media:description>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/index-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>PHP Gmail Imap Connection with Database Insert</title>
		<link>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/</link>
		<comments>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 16:15:02 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=531</guid>
		<description><![CDATA[Using PHP, We will connect to a Gmail mailbox and pull down the last message headers and to and from email addresses. With this data, we will insert it into a MySQL Database and then delete the message from the IMAP Server. LET ME KNOW IF THIS HELPED YOU IN THE COMMENTS! Enjoy! Here is [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2010/03/31/php-gmail-imap-connection-with-database-insert/"><img src="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" alt="gmail php mysql imap" title="gmail php mysql imap"  /></a><br />
Using PHP, We will connect to a Gmail mailbox and pull down the last message headers and to and from email addresses.<br />
With this data, we will insert it into a MySQL Database and then delete the message from the IMAP Server.</p>
<p><b>LET ME KNOW IF THIS HELPED YOU IN THE COMMENTS!</b> Enjoy!</p>
<p>Here is the code:<br />
<span id="more-531"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$dbhost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_USER'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbpass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_PASSWORD'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_NAME'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$imapserverstring</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'imap.gmail.com:993/imap/ssl/novalidate-cert'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$imapuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLE_USERNAME@gmail.com'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$imappass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLE_PASSWORD'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #000088;">$mbox</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_open</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;{&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$imapserverstring</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;}INBOX&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imapuser</span><span style="color: #339933;">,</span><span style="color: #000088;">$imappass</span><span style="color: #009900;">&#41;</span>	or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;can't connect: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$check</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_mailboxmsginfo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$check</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Date: &quot;</span>     <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Date</span>    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Driver: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Driver</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Mailbox: &quot;</span>  <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Mailbox</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Messages: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Nmsgs</span>   <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Recent: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Recent</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Unread: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Unread</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Deleted: &quot;</span>  <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Deleted</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Size: &quot;</span>     <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Size</span>    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;imap_check() failed: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;h1&gt;Headers in INBOX&lt;/h1&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_headers</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headers</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Call failed (or no messages)&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headers</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$val</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$FirstMessageArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">imap_fetchbody</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$FirstMessageArray</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span>  <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$FirstMessageArray</span> <span style="color: #339933;">,</span>  <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
	<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbhost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbpass</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error connecting to mysql'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$query</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO `DatabaseTable` (`id`, `to`, `from`, `subject`, `message`) VALUES (NULL, '<span style="color: #006699; font-weight: bold;">{$to}</span>', '<span style="color: #006699; font-weight: bold;">{$from}</span>', '<span style="color: #006699; font-weight: bold;">{$subject}</span>', '<span style="color: #006699; font-weight: bold;">{$message}</span>');&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #990000;">imap_delete</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><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;">imap_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" medium="image">
			<media:title type="html">gmail php mysql imap</media:title>
		</media:content>
	</item>
		<item>
		<title>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</title>
		<link>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/</link>
		<comments>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 21:05:11 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[subject]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tiki]]></category>
		<category><![CDATA[tikiwiki]]></category>
		<category><![CDATA[Tracker]]></category>
		<category><![CDATA[tracker name]]></category>
		<category><![CDATA[tracker_changed_notification_subject]]></category>
		<category><![CDATA[tracker_changed_notification_subject.tpl]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=387</guid>
		<description><![CDATA[The template for the Tracker email is here: \tikiwiki\templates\mail\tracker_changed_notification_subject.tpl I changed it to this so that it would improve the way it looks in emails: {$mail_trackerName}{tr} - #{/tr}{$mail_itemId}{tr} modified.{/tr} Related posts:Outlook Rule : Only at Specific Times .Net &#8211; Sending Email with In Memory Attachment Python: Wunderground Todays Weather to Email SMS to Phone


Related posts:<ol><li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
<li><a href='http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/' rel='bookmark' title='Permanent Link: .Net &#8211; Sending Email with In Memory Attachment'>.Net &#8211; Sending Email with In Memory Attachment</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/tikiwiki-2/" rel="attachment wp-att-391"><img src="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1.jpg" alt="tikiwiki" title="tikiwiki" width="200" height="150" class="alignleft size-full wp-image-391" /></a></p>
<p>The template for the Tracker email is here:<br />
\tikiwiki\templates\mail\tracker_changed_notification_subject.tpl</p>
<p>I changed it to this so that it would improve the way it looks in emails:<br />
<code><br />
{$mail_trackerName}{tr} - #{/tr}{$mail_itemId}{tr} modified.{/tr}<br />
</code></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
<li><a href='http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/' rel='bookmark' title='Permanent Link: .Net &#8211; Sending Email with In Memory Attachment'>.Net &#8211; Sending Email with In Memory Attachment</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1.jpg" medium="image">
			<media:title type="html">tikiwiki</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line</title>
		<link>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/</link>
		<comments>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/#comments</comments>
		<pubDate>Wed, 06 May 2009 15:32:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=249</guid>
		<description><![CDATA[This is similar to my Python script here: http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/ It uses this sites service to pull the location of each user: http://www.ipmap.com/ It outputs in XML, Plain Text, and HTML. Fields: ip hostname ipreverse country region city blacklist gmaps HERE IS THE LINK TO THE WEB SERVICE SITE: http://www.danfolkes.com/ipmaps/ Related posts:IPMap Python Ip Address Locator [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/04/29/ipmapcom-python/' rel='bookmark' title='Permanent Link: IPMap Python Ip Address Locator Command Line Script'>IPMap Python Ip Address Locator Command Line Script</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
<li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is similar to my Python script here:<br />
<a href="http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/">http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/</a></p>
<p>It uses this sites service to pull the location of each user:<br />
<a href="http://www.ipmap.com/">http://www.ipmap.com/</a></p>
<p>It outputs in XML, Plain Text, and HTML.<br />
Fields:</p>
<ul>
<li>ip</li>
<li>hostname</li>
<li>ipreverse</li>
<li>country</li>
<li>region</li>
<li>city</li>
<li>blacklist</li>
<li>gmaps</li>
</ul>
<p>HERE IS THE LINK TO THE WEB SERVICE SITE:<br />
<a href="http://www.danfolkes.com/ipmaps/">http://www.danfolkes.com/ipmaps/</a></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/04/29/ipmapcom-python/' rel='bookmark' title='Permanent Link: IPMap Python Ip Address Locator Command Line Script'>IPMap Python Ip Address Locator Command Line Script</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
<li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>CWS &#8211; Chord Web Service</title>
		<link>http://danfolkes.com/2009/03/31/cws-chord-web-service/</link>
		<comments>http://danfolkes.com/2009/03/31/cws-chord-web-service/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 19:56:20 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Chord]]></category>
		<category><![CDATA[Chords]]></category>
		<category><![CDATA[CWS]]></category>
		<category><![CDATA[deliver]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[guitars]]></category>
		<category><![CDATA[musical]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://danfolkes.com/index.php/2009/03/31/cws-chord-web-service/</guid>
		<description><![CDATA[I am creating a web service for musicians that will allow them to reference an abundance of musical references on the fly using AJAX. Firstly, it will deliver chords and fingerings of chords for guitars to the users websites (think Google Maps). My goal is to enhance the web. Here is the site: http://cws.danfolkes.com It&#8217;s [...]


Related posts:<ol><li><a href='http://danfolkes.com/2000/05/06/colbert-report-persian-gulf-secret-code/' rel='bookmark' title='Permanent Link: Colbert Report &#8211; Persian Gulf &#8211; Secret Code'>Colbert Report &#8211; Persian Gulf &#8211; Secret Code</a></li>
<li><a href='http://danfolkes.com/2009/12/15/view-of-my-sites-traffic/' rel='bookmark' title='Permanent Link: View of My Sites Traffic'>View of My Sites Traffic</a></li>
<li><a href='http://danfolkes.com/2000/05/21/datagov-runs-on-drupal/' rel='bookmark' title='Permanent Link: Data.Gov Runs on Drupal'>Data.Gov Runs on Drupal</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/wp-content/uploads/2009/03/cwd-chord-web-service.gif"><img src="http://danfolkes.com/wp-content/uploads/2009/03/cwd-chord-web-service-253x300.gif" alt="cwd-chord-web-service" title="cwd-chord-web-service" width="253" height="300" class="alignnone size-medium wp-image-221" align="left" /></a></p>
<p>I am creating a web service for musicians that will allow them to reference an abundance of musical references on the fly using AJAX.</p>
<p>Firstly, it will deliver chords and fingerings of chords for guitars to the users websites (think Google Maps).</p>
<p>My goal is to enhance the web.</p>
<p>Here is the site: <em><strong><a href="http://cws.danfolkes.com" target="_blank">http://cws.danfolkes.com</a></strong></em></p>
<p>It&#8217;s still in development, but it&#8217;s getting close to launch.</p>
<p>Let me know what you think (only if it&#8217;s nice) <img src='http://danfolkes.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2000/05/06/colbert-report-persian-gulf-secret-code/' rel='bookmark' title='Permanent Link: Colbert Report &#8211; Persian Gulf &#8211; Secret Code'>Colbert Report &#8211; Persian Gulf &#8211; Secret Code</a></li>
<li><a href='http://danfolkes.com/2009/12/15/view-of-my-sites-traffic/' rel='bookmark' title='Permanent Link: View of My Sites Traffic'>View of My Sites Traffic</a></li>
<li><a href='http://danfolkes.com/2000/05/21/datagov-runs-on-drupal/' rel='bookmark' title='Permanent Link: Data.Gov Runs on Drupal'>Data.Gov Runs on Drupal</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/03/31/cws-chord-web-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/03/cwd-chord-web-service-150x150.gif" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/03/cwd-chord-web-service.gif" medium="image">
			<media:title type="html">cwd-chord-web-service</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/03/cwd-chord-web-service-150x150.gif" />
		</media:content>
	</item>
	</channel>
</rss>

