<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Latent Motion &#187; PHP</title>
	<atom:link href="http://www.latentmotion.com/category/web-programming/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.latentmotion.com</link>
	<description>Usability, Design and Front-Side Programming</description>
	<lastBuildDate>Tue, 27 Jul 2010 05:40:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get Email Alerts from Google Analytics</title>
		<link>http://www.latentmotion.com/get-email-alerts-from-google-analytics/</link>
		<comments>http://www.latentmotion.com/get-email-alerts-from-google-analytics/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 15:13:26 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[critical alerts]]></category>
		<category><![CDATA[email alerts]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google analytics reports]]></category>
		<category><![CDATA[google reports]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[web stats]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=359</guid>
		<description><![CDATA[
Consider this Google Analytics Reports on crack. With this script, you can get an email when any of your websites drop in visit or page view counts (or anything else you want).
This plugin uses the Google Analytics API to send you reports conditionally, and is highly extensible, allowing you to pick and choose the stats [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right;"><a style="margin: 0 0 20px 30px;" href="http://www.latentmotion.com/downloads/critical-alerts.zip"><img class="trans80" style="border: none;" src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-php.png" alt="" /></a></div>
<p>Consider this Google Analytics Reports on crack. <strong>With this script, you can get an email when any of your websites drop in visit or page view counts</strong> (or anything else you want).</p>
<p>This plugin uses the Google Analytics API to send you reports conditionally, and is highly extensible, allowing you to pick and choose the stats you want to email based on, the threshold to notify you at, and which stats you want to send. Best of all, it accepts a list of websites within your account to check, such that <strong>you can be managing hundreds of sites, and only receive reports for the ones that need your attention</strong>.</p>
<p>Obviously, a notification of a significant decline in web stats could indicate a site being down, hacked, or busted in the search results. Ready to get it? You can <a style="font-weight: bold;" href="http://www.latentmotion.com/downloads/critical-alerts.zip">download the Critical Alerts script here</a>. Want help implementing it? Watch the video below for a blow-by-blow.</p>
<p><a rel="shadowbox;width=954;height=563" href="http://www.latentmotion.com/analytics/demo/index.htm"><img class="trans80" style="border: 1px solid #ccc;" src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/critical-alert-video.png" alt="" /></a></p>
<p>After watching the video, be sure to <a href="http://www.latentmotion.com/feed/">Subscribe to my RSS Feed</a>, as I&#8217;ll be releasing more complex and elegant reports based on this script.</p>
<p>Also, in case it&#8217;s unclear in the Script (or if you want to copy paste it), the cron job to run is:<br />
<strong>php ~/public_html/analytics/alert.php</strong></p>
<p><em>Finally, a Special Thanks to:</em></p>
<ul>
<li><em>This script depends upon and appreciates the google analytics php class. It can be downloaded in this bundle, or found here: <a href="http://www.askaboutphp.com/tutorials/63/google-analytics-api-class-for-php.html">http://www.askaboutphp.com/tutorials/63/google-analytics-api-class-for-php.html</a></em></li>
<li><em>Dave Della Costa and Gordon Clark for shoring up my knowledge gaps on PHP. I&#8217;m a front-end guy by profession, so coding this was syntactically a stretch.</em></li>
</ul>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fget-email-alerts-from-google-analytics%252F%26amp%3Btitle%3DGet%2520Email%2520Alerts%2520from%2520Google%2520Analytics%26amp%3Bbodytext%3D%250D%250AConsider%2520this%2520Google%2520Analytics%2520Reports%2520on%2520crack.%2520With%2520this%2520script%252C%2520you%2520can%2520get%2520an%2520email%2520when%2520any%2520of%2520your%2520websites%2520drop%2520in%2520visit%2520or%2520page%2520view%2520counts%2520%2528or%2520anything%2520else%2520you%2520want%2529.%250D%250A%250D%250AThis%2520plugin%2520uses%2520the%2520Google%2520Analytics%2520API%2520to%2520send%2520you%2520reports%2520condit';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fget-email-alerts-from-google-analytics%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fget-email-alerts-from-google-analytics%252F%26amp%3Btitle%3DGet%2520Email%2520Alerts%2520from%2520Google%2520Analytics%26amp%3Bnotes%3D%250D%250AConsider%2520this%2520Google%2520Analytics%2520Reports%2520on%2520crack.%2520With%2520this%2520script%252C%2520you%2520can%2520get%2520an%2520email%2520when%2520any%2520of%2520your%2520websites%2520drop%2520in%2520visit%2520or%2520page%2520view%2520counts%2520%2528or%2520anything%2520else%2520you%2520want%2529.%250D%250A%250D%250AThis%2520plugin%2520uses%2520the%2520Google%2520Analytics%2520API%2520to%2520send%2520you%2520reports%2520condit';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DGet%2520Email%2520Alerts%2520from%2520Google%2520Analytics%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fget-email-alerts-from-google-analytics%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/get-email-alerts-from-google-analytics/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Calling Remote JSON Files via Javascript / jQuery</title>
		<link>http://www.latentmotion.com/calling-remote-json-files-via-javascript-jquery/</link>
		<comments>http://www.latentmotion.com/calling-remote-json-files-via-javascript-jquery/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 16:00:10 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[data feeds]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[getjson]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=310</guid>
		<description><![CDATA[Not too long ago, I was asked to create a rolling delicious feed using their JSON data. It took me quite a while to realize what was going wrong &#8211; but the solution was obvious as soon as the problem became clear. If you&#8217;re going down the same path, maybe this bit of advice will [...]]]></description>
			<content:encoded><![CDATA[<p>Not too long ago, I was asked to create a rolling delicious feed using their JSON data. It took me quite a while to realize what was going wrong &#8211; but the solution was obvious as soon as the problem became clear. If you&#8217;re going down the same path, maybe this bit of advice will help.</p>
<p>Firstly, you have to create a local reference of the JSON data. As I understand it, this has to do with the <a href="http://en.wikipedia.org/wiki/JSON#Security_issues">JSON server settings and security</a>. In any event, it&#8217;s easy enough to do. Create a file, such as my delicious-json.php. All you need to put in it is this:</p>
<pre><pre class="brush: php;">

&lt;?php
echo file_get_contents(&quot;http://feeds.delicious.com/v2/json/tag/hyperstudio&quot;);
?&gt;

</pre></pre>
<p>Easy peasy. Now you can reference it via jQuery, like so:</p>
<pre><pre class="brush: jscript;">
&lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'&gt;&lt;/script&gt;
$(document).ready(function(){
// DELICIOUS JSON -- http://feeds.delicious.com/v2/json/tag/hyperstudio
  $.getJSON('delicious-json.php', function(data){
    $.each(data, function(i, entry) {
      // Process your data here
    });
  });
});
</pre></pre>
<p>How you use the JSON is up to you. In tomorrow&#8217;s post, I&#8217;ll describe my preferred method &#8211; cloning a model. Doing so has a lot of speed benefits, but more importantly, it separates the html from the javascript. As a consequence, any web designer can easily step in and modify the aesthetics without touching code. This facilitates the very important separation of concerns.</p>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fcalling-remote-json-files-via-javascript-jquery%252F%26amp%3Btitle%3DCalling%2520Remote%2520JSON%2520Files%2520via%2520Javascript%2520%252F%2520jQuery%26amp%3Bbodytext%3DNot%2520too%2520long%2520ago%252C%2520I%2520was%2520asked%2520to%2520create%2520a%2520rolling%2520delicious%2520feed%2520using%2520their%2520JSON%2520data.%2520It%2520took%2520me%2520quite%2520a%2520while%2520to%2520realize%2520what%2520was%2520going%2520wrong%2520-%2520but%2520the%2520solution%2520was%2520obvious%2520as%2520soon%2520as%2520the%2520problem%2520became%2520clear.%2520If%2520you%2527re%2520going%2520down%2520the%2520same%2520path%252C%2520m';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fcalling-remote-json-files-via-javascript-jquery%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fcalling-remote-json-files-via-javascript-jquery%252F%26amp%3Btitle%3DCalling%2520Remote%2520JSON%2520Files%2520via%2520Javascript%2520%252F%2520jQuery%26amp%3Bnotes%3DNot%2520too%2520long%2520ago%252C%2520I%2520was%2520asked%2520to%2520create%2520a%2520rolling%2520delicious%2520feed%2520using%2520their%2520JSON%2520data.%2520It%2520took%2520me%2520quite%2520a%2520while%2520to%2520realize%2520what%2520was%2520going%2520wrong%2520-%2520but%2520the%2520solution%2520was%2520obvious%2520as%2520soon%2520as%2520the%2520problem%2520became%2520clear.%2520If%2520you%2527re%2520going%2520down%2520the%2520same%2520path%252C%2520m';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DCalling%2520Remote%2520JSON%2520Files%2520via%2520Javascript%2520%252F%2520jQuery%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fcalling-remote-json-files-via-javascript-jquery%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/calling-remote-json-files-via-javascript-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCK / Firefox Fix</title>
		<link>http://www.latentmotion.com/fck-firefox-fix/</link>
		<comments>http://www.latentmotion.com/fck-firefox-fix/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 03:52:32 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=178</guid>
		<description><![CDATA[
Before I got too involved with posting on this blog, I wanted to make sure all my code was validating (or that I had a good reason for it not to be). Along this process, I noticed a couple of tags repeatedly appearing in my posts:

&#60;input id=&#34;gwProxy&#34; type=&#34;hidden&#34; /&#62;
&#60;input id=&#34;jsProxy&#34; onclick=&#34;jsCall();&#34; type=&#34;hidden&#34; /&#62;

After a bit [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right;"><a href="http://www.latentmotion.com/downloads/fck-fix.zip" style="margin:0 5px 20px 30px;"><img src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-plugin.png" style="border:none;" /></a></div>
<p>Before I got too involved with posting on this blog, I wanted to make sure all my code was validating (or that I had a good reason for it not to be). Along this process, I noticed a couple of tags repeatedly appearing in my posts:</p>
<pre><pre class="brush: xml;">
&lt;input id=&quot;gwProxy&quot; type=&quot;hidden&quot; /&gt;
&lt;input id=&quot;jsProxy&quot; onclick=&quot;jsCall();&quot; type=&quot;hidden&quot; /&gt;
</pre></pre>
<p>After a bit of Googling, I soon learned that it was a Firefox problem with FCK editor (the wysiwyg for wordpress posts), probably relating to specific addons installed in the browser. Well, rather then chase them down, or convert to using chrome or IE only for my wordpress posts, I thought I&#8217;d try my hand at creating a plugin that fixed it server-side. Although I&#8217;m not a php programmer, it turned out to be much easier than I expected. Just about 6 lines in all.</p>
<p>Anyway, if you&#8217;re having the problem as well and would like a quick fix, grab my FCK Fix plugin and give it a whirl.</p>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffck-firefox-fix%252F%26amp%3Btitle%3DFCK%2520%252F%2520Firefox%2520Fix%26amp%3Bbodytext%3D%250D%250ABefore%2520I%2520got%2520too%2520involved%2520with%2520posting%2520on%2520this%2520blog%252C%2520I%2520wanted%2520to%2520make%2520sure%2520all%2520my%2520code%2520was%2520validating%2520%2528or%2520that%2520I%2520had%2520a%2520good%2520reason%2520for%2520it%2520not%2520to%2520be%2529.%2520Along%2520this%2520process%252C%2520I%2520noticed%2520a%2520couple%2520of%2520tags%2520repeatedly%2520appearing%2520in%2520my%2520posts%253A%250D%250A%255Bhtml%255D%250D%250A%2526lt%253Binpu';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffck-firefox-fix%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffck-firefox-fix%252F%26amp%3Btitle%3DFCK%2520%252F%2520Firefox%2520Fix%26amp%3Bnotes%3D%250D%250ABefore%2520I%2520got%2520too%2520involved%2520with%2520posting%2520on%2520this%2520blog%252C%2520I%2520wanted%2520to%2520make%2520sure%2520all%2520my%2520code%2520was%2520validating%2520%2528or%2520that%2520I%2520had%2520a%2520good%2520reason%2520for%2520it%2520not%2520to%2520be%2529.%2520Along%2520this%2520process%252C%2520I%2520noticed%2520a%2520couple%2520of%2520tags%2520repeatedly%2520appearing%2520in%2520my%2520posts%253A%250D%250A%255Bhtml%255D%250D%250A%2526lt%253Binpu';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DFCK%2520%252F%2520Firefox%2520Fix%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Ffck-firefox-fix%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/fck-firefox-fix/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>
