<?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>Josh Can Help - web strategy, search engine optimization analysis, and company email marketing &#187; Learning PHP</title>
	<atom:link href="http://www.joshcanhelp.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshcanhelp.com</link>
	<description>Building, marketing, and succeeding as an Online Strategist</description>
	<lastBuildDate>Wed, 28 Jul 2010 19:49:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Easily track and build Google Analytics UTM campaign URLs with Google Docs</title>
		<link>http://www.joshcanhelp.com/everything-else/1265/easily-track-and-build-google-analytics-utm-campaign-urls-with-google-docs/</link>
		<comments>http://www.joshcanhelp.com/everything-else/1265/easily-track-and-build-google-analytics-utm-campaign-urls-with-google-docs/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 22:47:36 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[Helpful Software]]></category>
		<category><![CDATA[Learning PHP]]></category>
		<category><![CDATA[Web Site Analytics]]></category>
		<category><![CDATA[campaign tracking]]></category>
		<category><![CDATA[campaign URLs]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Analytics campaigns]]></category>
		<category><![CDATA[google analytics utm]]></category>
		<category><![CDATA[Google Docs]]></category>
		<category><![CDATA[UTM codes]]></category>
		<category><![CDATA[UTM URL builder]]></category>

		<guid isPermaLink="false">http://www.joshcanhelp.com/?p=1265</guid>
		<description><![CDATA[If you&#8217;re using Google Analytics and you&#8217;re not taking advantage of its built-in campaign tracking, you&#8217;re missing out on important insights. Campaign tracking uses URL query strings to determine where your traffic is coming from specifically. URL query strings are the funny &#8220;?something=this&#38;somethingelse=that&#8221; text that you see on the end of URLs (try a Google [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using Google Analytics and you&#8217;re not taking advantage of its built-in campaign tracking, you&#8217;re missing out on important insights. Campaign tracking uses URL query strings to determine where your traffic is coming from specifically. URL query strings are the funny &#8220;?something=this&amp;somethingelse=that&#8221; text that you see on the end of URLs (try a Google search and look in your address bar). By using this tracking method, you can understand your traffic better and learn what&#8217;s working and what isn&#8217;t. It&#8217;s particularly beneficial for people who are promoting their site across several different channels like email, Twitter, and Google Adwords. <a href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;answer=55540">Here is a little more in-depth description from Google</a>.</p>
<p>The most annoying part about using tracking codes, however, is creating the URL. You need to append at least two (and up to five) query strings to your URL to use this function in Analytics and making this happen while tracking what codes you&#8217;re actually using is frustrating enough to make you rethink this whole thing in the first place. Google provides a cute little tool to help you but it&#8217;s still a pain in the ass.</p>
<p>Google Docs to the rescue! Using similar code as my <a href="http://www.joshcanhelp.com/google-docs-cms/">simple Google Docs CMS</a>, I created a script that parses a spreadsheet full of tracking codes and turn them into usable URLs that you can then copy and paste. It makes it easy to keep track of the campaigns you have while quickly creating error-free URLs. <strong><a href="http://www.joshcanhelp.com/design_portfolio/php/utm/link-append-util.php">See the Google Docs UTM appender in action</a></strong>.</p>
<p><a class="download-link" href="/downloads/link-append-util.zip">Download the UTM URL builder</a><span id="more-1265"></span><br />
What you&#8217;ll need:</p>
<ol>
<li>The file from the big, green link above</li>
<li>A Google Docs account (it&#8217;s free, you can sign up <a href="http://docs.google.com/">here</a>)</li>
<li>Access to a web server or a local host that can run a PHP program</li>
<li>A site using Google Analytics</li>
</ol>
<h2>Step 1 &#8211; Create a new Google Docs Spreadsheet</h2>
<p>Easy enough&#8230; go to <a href="http://docs.google.com/">docs.google.com</a> and log in. Click the <strong>Create New</strong> button on the top left and select &#8220;Spreadsheet.&#8221;</p>
<p><img class="aligncenter size-full wp-image-1266" title="create-google-docs-spreadsheet" src="http://www.joshcanhelp.com/wp-content/uploads/2009/12/create-google-docs-spreadsheet.png" alt="create-google-docs-spreadsheet" width="167" height="245" /></p>
<ol>
<li>When the spreadsheet loads, look for a <strong>Share </strong>button on the top right. If it prompts you to save the document, type in a nice descriptive name, click <strong>OK</strong>, and click <strong>Share</strong> again.</li>
<li>In the menu that appears, select<strong> </strong>&#8220;Publish as a web page.&#8221;</li>
</ol>
<p><img class="aligncenter" src="http://www.joshcanhelp.com/google-docs-cms/images/create-doc03.png" alt="" width="300" height="243" /></p>
<ol start="3">
<li> Select &#8220;Sheet1&#8243; from the top drop-down, then click <strong>Start Publishing</strong>.</li>
<li>Under &#8220;Get a link to the published data,&#8221; select &#8220;RSS&#8221; from the first drop down then click the <strong>Cells </strong>radio button.</li>
<li>In the text box at the bottom, you should have a URL like &#8220;http://spreadsheets.google.com/feeds/cells/tFjKofPSUgX5PSPJhEuH7Dw/od6/public/basic?alt=rss.&#8221; Highlight the whole thing and copy it, then click <strong>Close</strong> on the window.</li>
</ol>
<h2>Step 2 &#8211; Add your Google Doc link to the script and upload</h2>
<p>Now, we need to open the PHP file and give it the link to your Google Doc. Open the index.php file as plain text using Notepad (PC) or TextEdit (Apple). When you open the file, you should be able to read the code clearly (even if you can&#8217;t quite understand it). You should see &#8220;<em>$feedName=</em>&#8221; right near the top of the document. Paste the link you copied in the step before in between the tick marks after the equals sign. When you&#8217;re finished, you should have some like this:</p>
<blockquote><p><em>$feedName = &#8216;http://spreadsheets.google.com/feeds/cells/tjMfK6oILkthGlM9Vo_8ACQ/od6/public/basic?alt=rss&#8217;</em></p></blockquote>
<p>If the link is correct, the script should be ready to display the Google Doc. Unless you have a server instance installed locally, you&#8217;ll need to upload this script to a public web server. If you have your own website, just upload this file to any public folder. If you&#8217;re confused, email your IT department or your tech-savvy niece.</p>
<p>Once the file is uploaded, you&#8217;ll want to test it out to make sure everything is working. Go to the file you uploaded (http://[your domain]/[the path to the folder you used]/link-append-util.php) and you should see &#8220;UTM coded URLs&#8221; at the top. If you see &#8220;Invalid feed!&#8221; then the link to the Google Doc was not made. Make sure the URL is correct and in between the tick marks after <em>$feedName=</em>.</p>
<h2>Step 3 &#8211; Update your spreadsheet with the tracking codes</h2>
<p>Once the script is functioning, you&#8217;re ready to input your URLs and tracking codes.</p>
<p>The spreadsheet needs to by laid out properly to make sure that the script can read and display the information in the right order. Here are the rules and you can see a sample of a functioning Google Doc <a href="http://spreadsheets.google.com/ccc?key=0Al9b4H4rdFOkdGpNZks2b0lMa3RoR2xNOVZvXzhBQ1E&amp;hl=en">here</a> (it&#8217;s the one I use to create the example <a href="http://www.joshcanhelp.com/design_portfolio/php/utm/link-append-util.php">here</a>).</p>
<ul>
<li>Cells A1, B1, C1, D1, and E1 will not be read by the script.</li>
<li>Cells F1, G1, H1, and I1 determine the name of 4 additional custom references that can be added.</li>
<li>Column A after row 1 is the name of the link. This can be anything.</li>
<li>Column B needs to be a valid URL without pre-existing query strings (meaning that there can&#8217;t already be a &#8220;?&#8221; in it)</li>
<li>Column C is your utm_source code</li>
<li>Column D is your utm_medium code</li>
<li>Column E is your utm_campaign code</li>
<li>Columns F through I can be any other reference code you&#8217;d like. Again, the name will be taken from the column header. Leave these blank if you don&#8217;t want to use them</li>
</ul>
<p>A few things to keep in mind:</p>
<ul>
<li>The source, medium, and campaign codes are required meaning that they are always pulled. If you leave one blank, it messes up the rest so make sure you always have a value in there. If enough people want to eliminate this requirement, I&#8217;m happy to offer an alternative, just comment below.</li>
<li>If you&#8217;re not using the custom reference codes, you can leave them blank. If you are using them and each URL will have one, then you&#8217;re good to go. But if some URLs need one, others need another, make sure to put an &#8220;x&#8221; where you <strong>don&#8217;t </strong>need one. For example, if the first URL is using reference2 but not reference1 and the second URL is using reference1 but not reference2, make sure there is an &#8220;x&#8221; under reference1 for the first URL and under reference2 for the second. Hopefully that makes sense. Again, comment if you&#8217;re confused!</li>
</ul>
<h2>Step 4 &#8211; Reload the script and fire away</h2>
<p>Once your codes are loaded, refresh the script and you&#8217;ll see them listed nicely in a row. In order for each one:</p>
<ol>
<li>The first thing listed is the name from column A for that link.</li>
<li>Next you see &#8220;Paste into form field or if in doubt.&#8221; This is the not-validated version of the URL . This should work everywhere and is the safest choice. If you&#8217;re not sure what the hell I&#8217;m talking about, use this one. There is a &#8220;test it&#8221; link that tries it out.</li>
<li>Next is a field with the URL. Just click once to highlight, copy it, and paste it where you need it.</li>
<li>After that you&#8217;ll see &#8220;Paste into code.&#8221; Use this for HTML and PHP that is not validated (i.e. within an application file or static page).</li>
<li>The validated version of the URL appears in the text field. Click to highlight, etc.</li>
</ol>
<h2>Step 5 &#8211; Comment, Share, or Tweet if you like it!</h2>
<p>That&#8217;s all I ask!</p>
<p>Please leave comments, questions, and suggestions below. I hope this saves you as much time as it save me!</p>


<p>Related posts:<ol><li><a href='http://www.joshcanhelp.com/web-site/1207/create-a-simple-website-with-the-google-docs-cms/' rel='bookmark' title='Permanent Link: Create a simple website with the Google Docs CMS'>Create a simple website with the Google Docs CMS</a> <small>In attempt to solve one problem, I figured out a...</small></li>
<li><a href='http://www.joshcanhelp.com/seo/983/understanding-the-basics-of-google-analytics/' rel='bookmark' title='Permanent Link: Understanding the Basics of Google Analytics'>Understanding the Basics of Google Analytics</a> <small>If I could recommend one skill to business owners with...</small></li>
<li><a href='http://www.joshcanhelp.com/web-site-analytics/1539/basic-website-analytics-for-content-managers/' rel='bookmark' title='Permanent Link: Basic Website Analytics for Content Managers'>Basic Website Analytics for Content Managers</a> <small>If you work with a site that publishes articles on...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.joshcanhelp.com/everything-else/1265/easily-track-and-build-google-analytics-utm-campaign-urls-with-google-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a simple website with the Google Docs CMS</title>
		<link>http://www.joshcanhelp.com/web-site/1207/create-a-simple-website-with-the-google-docs-cms/</link>
		<comments>http://www.joshcanhelp.com/web-site/1207/create-a-simple-website-with-the-google-docs-cms/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:44:25 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Build A Web Site]]></category>
		<category><![CDATA[Learning PHP]]></category>
		<category><![CDATA[social technology]]></category>
		<category><![CDATA[easy CMS]]></category>
		<category><![CDATA[GDocs CMS]]></category>
		<category><![CDATA[Google Docs]]></category>
		<category><![CDATA[Google Docs CMS]]></category>
		<category><![CDATA[Google Docs RSS]]></category>

		<guid isPermaLink="false">http://www.joshcanhelp.com/?p=1207</guid>
		<description><![CDATA[In attempt to solve one problem, I figured out a way to easily publish and manage data on the web by using a simple Google Documents spreadsheet. What I was trying to do was come up with the simplest way possible to manage my Josh Can Help network page. What I realized is that, with [...]]]></description>
			<content:encoded><![CDATA[<p>In attempt to solve one problem, I figured out a way to easily publish and manage data on the web by using a simple Google Documents spreadsheet. What I was trying to do was come up with the simplest way possible to manage my<a href="http://www.joshcanhelp.com/about/about-the-josh-can-help-team/"> Josh Can Help network page</a>. What I realized is that, with a little extra work, you could manage a whole website.</p>
<h2>The Google Docs CMS</h2>
<p><a href="http://joshcanhelp.com/google-docs-cms/?page=home"><strong>See the GDocs CMS in action!</strong></a></p>
<p>For those not in the know, a CMS is a Content Management System, a web application that lets you add and edit live web content. WordPress, the system I use over-and-over (for good reason), is a CMS and a great one at that. But, in some cases, it is a bit over the top. What if you just needed to publish information without a lot of regard to the intricacies of presentation? That&#8217;s where this system comes in.</p>
<p>The Google Docs CMS lets you publish and manage information on the web using just a Google Docs spreadsheet published as RSS (easy to do, I&#8217;ll show you how). The script takes each row and turns it into its own page then creates a list of pages on the left. A site example (which serves as documentation) can be seen here: <a href="http://joshcanhelp.com/google-docs-cms/">Google Docs CMS</a>.<br />
<span id="more-1207"></span></p>
<h2>How do I use it?</h2>
<p>All you need to do is download the package, follow my directions to create a spreadsheet, put a line of information into the script, and upload it to your web server. The script takes the Google Doc feed, parses the information for each page, and displays it a certain way.</p>
<h2>What can I do with it?</h2>
<p>In an effort to make these sites as easy to manage as possible, I restricted the number of built-in content to 4 types:</p>
<ul>
<li>Regular paragraphs (which can accept HTML)</li>
<li>Headings (h2 tags only)</li>
<li>Images (can pull automatically from your server or an external source)</li>
<li>Links (creates  its own line and doesn&#8217;t support link text [yet])</li>
</ul>
<p>Just indicate the content type in one column and the content itself in the next. It&#8217;s all in the documentation.</p>
<h2>Can I customize it?</h2>
<p>I created an external stylesheet that can be used to change how the page displays (you&#8217;ll need to know your way around CSS). I also built in a few configuration options in the beginning of the file to change a few functions. I am very much a beginner with PHP so the code should be simple enough to understand for those in the know.</p>
<h2>Questions? Problems? Issues?</h2>
<p>Please go ahead and leave comments below if you are having trouble or want to know how to change something. Also, if you&#8217;re a PHP developer and have some feedback for how this was implemented (good or bad), I would really appreciate it.</p>
<p><a class="download-link" href="http://www.joshcanhelp.com/google-docs-cms/?page=download-and-info">Download the GDocs CMS</a></p>
<h2>As an aside&#8230;</h2>
<p>This is my first attempt at a self-contained (and remotely useful) programming project of any kind. Like I mentioned, I&#8217;m a PHP beginner but use it a lot between WordPress customizations and static sites. I really enjoy using the language and the documentation on php.net is really, really impressive (the user comments are amazing). I try to use it as much as possible and I think the only reason I&#8217;m not much better with it is that I don&#8217;t give myself (read: have) a lot of time to practice.</p>
<p>Anyways, this was a very eye-opening exercise and one that I enjoyed very much. Truth be told, I wrote this during a long weekend I spent back in Seattle, so, essentially, on vacation. There was a little bit of frustration but a lot of &#8220;oh wow, cool!&#8221; &#8211; enough to keep me plugging away at it. String functions in PHP are fantastic and it&#8217;s amazing how easily XML documents can be parsed with just a tiny bit of code.</p>
<p>I&#8217;m looking forward to putting out little piece here and there, including a WordPress plugin in the future (I think that&#8217;s just to say I can). As I mentioned above, your feedback is very important to me, particularly if you&#8217;re skilled enough to find problems in the code and can tell me how to do it better.</p>
<p><strong>Thanks!</strong></p>


<p>Related posts:<ol><li><a href='http://www.joshcanhelp.com/everything-else/1265/easily-track-and-build-google-analytics-utm-campaign-urls-with-google-docs/' rel='bookmark' title='Permanent Link: Easily track and build Google Analytics UTM campaign URLs with Google Docs'>Easily track and build Google Analytics UTM campaign URLs with Google Docs</a> <small>If you&#8217;re using Google Analytics and you&#8217;re not taking advantage...</small></li>
<li><a href='http://www.joshcanhelp.com/marketing/484/you-want-to-create-a-website-but-why-make-sure-you-can-answer-that-question/' rel='bookmark' title='Permanent Link: You want to create a website but why? Make sure you can answer that question&#8230;'>You want to create a website but why? Make sure you can answer that question&#8230;</a> <small>The urge to create a website comes from many different...</small></li>
<li><a href='http://www.joshcanhelp.com/web-site/1471/make-it-simple-focused-high-performance-and-polished-my-web-philosophy/' rel='bookmark' title='Permanent Link: Make it Simple, Focused, High-Performance, and Polished: My Web Philosophy'>Make it Simple, Focused, High-Performance, and Polished: My Web Philosophy</a> <small>I was asked recently by a potential client what my...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.joshcanhelp.com/web-site/1207/create-a-simple-website-with-the-google-docs-cms/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Improve WordPress Performance by 36 Percent</title>
		<link>http://www.joshcanhelp.com/web-site/993/improve-wordpress-performance-by-36-percent/</link>
		<comments>http://www.joshcanhelp.com/web-site/993/improve-wordpress-performance-by-36-percent/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 19:00:03 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Build A Web Site]]></category>
		<category><![CDATA[Customize Wordpress]]></category>
		<category><![CDATA[Learning PHP]]></category>
		<category><![CDATA[HTTP Requests]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.joshcanhelp.com/?p=993</guid>
		<description><![CDATA[I was approached recently by the owner of a popular blog using WordPress software. This blog gets a lot of traffic on a regular basis but also has articles that reach the front page of Digg.com on a regular basis. For those of you not familiar with social media, this translates to very large traffic [...]]]></description>
			<content:encoded><![CDATA[<p>I was approached recently by the owner of a popular blog using WordPress software. This blog gets a lot of traffic on a regular basis but also has articles that reach the front page of Digg.com on a regular basis. For those of you not familiar with social media, this translates to very large traffic peaks. He wanted to know if there was anything he could do. As usual, Josh Can (and did) Help.</p>
<p><img class="aligncenter size-full wp-image-995" title="wordpress_logo" src="http://www.joshcanhelp.com/wp-content/uploads/2009/08/wordpress_logo.jpg" alt="wordpress_logo" width="300" height="300" /></p>
<h2>Step 1: Assess the situation</h2>
<p>WordPress is notorious for being a <a href="http://www.codinghorror.com/blog/archives/001105.html">big server resource hog</a> but there is little else out there that provides the kind of flexibility and extensibility on such an easy-to-use platform. I&#8217;m sure there are debates to be had but I&#8217;m a huge fan of WordPress and that&#8217;s not likely to change anytime soon.</p>
<p>In this case, the WordPress core along with several essential but potentially resource-heavy plugins were causing the server to become unresponsive and, at times, crash for several minutes. This happened during short periods of intense traffic caused by the aforementioned temporary Digg.com front page position (called &#8220;the Digg effect&#8221;).<br />
<span id="more-993"></span><br />
I ran a simple <a href="http://websiteoptimization.com/services/analyze/">website optimization test</a> and found several things that needed to be corrected:</p>
<ul>
<li>The site was creating close to 90 HTTP requests. This means that the web page asked for 90 different things across the internet before it would be complete. This is really high.</li>
<li>The images on the page tested were too large</li>
<li>The page size, in total, was over a megabyte. For very graphics-heavy sites, this might be normal but there was room to improve here.</li>
</ul>
<h2>Step 2: Plan of attack</h2>
<p>The first thing was to address images on the site. Several images needed to be decreased in size (read: lower quality) and the images called by the stylesheet, CSS images, needed to be combined into one file called a sprite.</p>
<p>Since page load speed is made worse by an increasing number of server requests (the HTTP requests I mention above), I wanted to cut that amount in half or more. I would do this by concentrating on items that were loaded from the hosting server. If you load 100 objects from other servers, the page may take a while to load but the host for the page you&#8217;re viewing won&#8217;t crash. Since the primary goal was to avoid crashes, this would be an important improvement.</p>
<h2>What happened?</h2>
<p>Though the ideas behind the improvements were simple, there was a lot of trial and error involved. Code written by different people sometimes doesn&#8217;t play well together so there was a lot of care taken to make sure that the right syntax appeared in the combined files. The plugins themselves were actually written very well and there was rarely any problem removing the references to certain files. A few observations:</p>
<ul>
<li> For one reason or another, combining javascript files is a very finicky procedure. I found that any JS that came after the JQuery block did not work. I also found that minifying the code broke it completely so that didn&#8217;t work.</li>
<li> There&#8217;s really some hard decisions to be made when you&#8217;re combining all of these files. You&#8217;re trading a lot of control for load speed in certain cases. The plugins that were modified can&#8217;t be upgraded automatically of the changes will be lost. In the case where there was a dynamically altered style sheet or javascript file, I left it alone. This left one minor JS error on the page because of the order that the scripts are called but nothing on the page is malfunctioning.</li>
<li> Working with a heavily cached site is very difficult because it is hard to figure out if the changes you made went through. Next time around, I&#8217;m going to turn the caching off.</li>
</ul>
<h2>In the end&#8230;</h2>
<p>With the changes made, we saw an improvement of around 36% (from 320 sec 56K load time to 206). The requests are sitting at 48 total (down from 90) and the site is running noticeably faster.</p>
<p><img class="aligncenter size-full wp-image-996" title="clarkson_face" src="http://www.joshcanhelp.com/wp-content/uploads/2009/08/clarkson_face.jpg" alt="clarkson_face" width="300" height="223" /></p>
<p>I made a few recommendations for managing the site going forward.</p>
<ul>
<li> The biggest thing you can do, as important as the code I changed, is to make sure your images are as small as possible. If you&#8217;re in Photoshop, save your JPGs at a 4 or 5 setting. Also, save non-photo images (logos, cartoons, etc) as GIFs. Give this site a try if you&#8217;re not proficient with a graphics program: <a href="http://tools.dynamicdrive.com/imageoptimizer/">http://tools.dynamicdrive.com/imageoptimizer/</a></li>
<li> On the topic of images&#8230; if you have the time, you might want to host some of your images offline (Picasa, Flickr, etc). This might increase load times a little bit but it will keep the load off of your server. Check those sites for bandwidth restrictions, though. It wouldn&#8217;t be good to have them take down an image that&#8217;s getting you a lot of traffic.</li>
<li> You&#8217;re fine to install new plugins on the site but keep it to a minimum. Many plugins won&#8217;t affect your load time at all but some will start adding things to your header which is exactly what I worked to remove. I can, of course, do the same modification to any new plugins as well, though.</li>
</ul>
<h2>Next Steps</h2>
<p>We&#8217;re getting as close as we can get to making the page as lightweight as possible. There are a few dynamic style sheets and JS files that could be combined if the settings never need to be changed but this might be overkill. I&#8217;d like to work out the JS minification issue if possible because we can squish 20KB out of that file.</p>
<p>The next big thing to tackle is the MySQL database. I found a <a href="http://blog.circlesixdesign.com/2007/01/22/diggproof/">few articles</a> that talked about some settings that can be modified to activate caching and a few other things. I&#8217;ll try them on my server before his, though!</p>


<p>Related posts:<ol><li><a href='http://www.joshcanhelp.com/marketing/1322/improving-website-and-wordpress-performance-with-hard-coded-share-buttons/' rel='bookmark' title='Permanent Link: Improving Website and WordPress Performance with Hard-Coded Share Buttons'>Improving Website and WordPress Performance with Hard-Coded Share Buttons</a> <small>Increasing the page load speed of your website has been...</small></li>
<li><a href='http://www.joshcanhelp.com/web-site/1108/new-custom-wordpress-theme-and-structure-at-joshcanhelp/' rel='bookmark' title='Permanent Link: New custom WordPress theme and structure at JoshCanHelp'>New custom WordPress theme and structure at JoshCanHelp</a> <small>I finally made the time to finish my site&#8217;s re-design...</small></li>
<li><a href='http://www.joshcanhelp.com/web-site/865/website-performance-and-health-reports/' rel='bookmark' title='Permanent Link: Website performance and health reports'>Website performance and health reports</a> <small>Google Analytics (GA) and Webmaster Tools (GWT) are used to...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.joshcanhelp.com/web-site/993/improve-wordpress-performance-by-36-percent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginner Excercises to Learn PHP Programming</title>
		<link>http://www.joshcanhelp.com/php/386/beginner-excercises-to-learn-php-programming/</link>
		<comments>http://www.joshcanhelp.com/php/386/beginner-excercises-to-learn-php-programming/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:00:21 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Learning PHP]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[exercises]]></category>
		<category><![CDATA[PHP exercises]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming exercises]]></category>

		<guid isPermaLink="false">http://www.joshcanhelp.com/?p=386</guid>
		<description><![CDATA[I&#8217;ve been on a quest to try my hand at a real programming language. I get the feeling that I&#8217;m really going to like what I learn. Said another way, I really hope that I like what I learn. My brain kind of works like a computer and if I can just figure out how [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been on a quest to try my hand at a real programming language. I get the feeling that I&#8217;m really going to like what I learn. Said another way, I really hope that I like what I learn. My brain kind of works like a computer and if I can just figure out how a computer operates on the nano level, I&#8217;ll be one step closer to understanding myself.</p>
<p>That was a joke.</p>
<p>After a thoroughly inexhaustive consideration of available languages, I chose PHP to learn a few things. Since I&#8217;ve been doing work in WordPress (written in PHP) and have had a few people express the need for database functionality in their webpages (PHP and MySQL can handle almost anything you can throw at it) AND I&#8217;m working on a site based on <a href="http://www.pligg.com">Pligg</a> (also written in PHP), it seemed like the right direction to go. It also seems fairly simple to pick up (comparatively) and the support/community/documentation is quite robust (one of the few words I use despite the fact that I hate it).</p>
<p>Despite the many pages dedicated to PHP tutorials, how-tos, and tips/tricks, I have not been very successful finding exercises I can practice with. I&#8217;ve been a student for longer than I care to admit, I need homework to function properly!! So I searched high and low and put together this list of beginner PHP exercises. I&#8217;m also including a link to my results so people can see the results (no guarantee of accuracy).</p>
<p><a href="http://devzone.zend.com/node/view/id/627">Zend&#8217;s Beginner&#8217;s Guide to PHP </a>is a  good place to start if you need a refresher or need some help. <a href="http://devzone.zend.com/node/view/id/627"><br />
</a></p>
<h3><a href="http://forums.digitalpoint.com/showthread.php?t=642480"><strong>From the Digital Point forums</strong></a></h3>
<ol>
<li>Define a variable called &#8216;name&#8217; containing the text &#8216;Mario&#8217; and then write &#8220;I am Mario.&#8221; using the variable to write the &#8216;Mario&#8217; part. You may only use two commands max!</li>
<li>Use the code from the previous example but add a check using an &#8216;if&#8217; condition to check whether the name is &#8216;mario&#8217;. Place the text from the previous example in the &#8216;if&#8217; condition.</li>
<li>Try changing the $name variable to &#8216;awaken&#8217;. You&#8217;ll notice that the previous script writes nothing (If it doesn&#8217;t, go back and redo #2, it&#8217;s not complete!)</li>
<li>Use a while-loop that starts at 0 and keeps running while the number is lower then 5. Write the variable to the screen after each run.</li>
<li>Modify the previous example to use a &#8216;for&#8217; loop instead of a &#8216;while&#8217; loop</li>
</ol>
<h3><a href="http://www.itu.dk/courses/WEB/E2002/PHP-intro/p23.php"><strong>From</strong> <strong>IT-UNIVERSITETET I KØBENHAVN</strong></a></h3>
<p>&#8220;Make a script that takes a number N as   argument and prints out the N&#8217;th line of the file <a href="http://www.itu.dk/courses/WEB/E2002/PHP-intro/brixtofte.txt">brixtofte.txt</a>. If N is negative or larger than the   number of lines in the file, an error message should be printed. Do   not forget the rules about manipulating with files!&#8221;</p>
<h3><a href="http://www.hudzilla.org/phpbook/"><strong>From Huzilla.org&#8217;s PHP book</strong></a></h3>
<p>A quick note about this site. The &#8220;book&#8221; is very useful but on every page you&#8217;ll see a big headline that tells you that that particular version in not the most current. The current version took a minute to load and was in wiki format. I didn&#8217;t immediately see any of the quizzes or exercises so I&#8217;m linking to the old version.</p>
<p>I&#8217;m only listing the first few sections of quizzes (the beginner information). Each section listed in the table of contents [http://www.hudzilla.org/phpbook/index.php] has its own exercise bank. URL links have been removed because their server is terribly slow at times and times out occasionally. Keep trying, it&#8217;s there (unless you get a 404).</p>
<ul>
<li>Quiz 1 (Introduction to PHP) [http://www.hudzilla.org/phpbook/read.php/2_10_0]</li>
<li>Quiz 2 (Variables and Operators) [http://www.hudzilla.org/phpbook/read.php/3_14_0]</li>
<li>Quiz 3 (Functions) [http://www.hudzilla.org/phpbook/read.php/4_25_0]</li>
<li>Quiz 4 (Arrays) [http://www.hudzilla.org/phpbook/read.php/5_13_0]</li>
<li>Quiz 5 (Objects) [http://www.hudzilla.org/phpbook/read.php/6_21_0]</li>
<li>Quiz 6 (Forms) [http://www.hudzilla.org/phpbook/read.php/7_10_0]</li>
<li>Quiz 7 (Files) [http://www.hudzilla.org/phpbook/read.php/8_18_0]</li>
<li>Quiz 8 (Databases) [http://www.hudzilla.org/phpbook/read.php/9_21_0]</li>
<li>Answers to all quizzes [http://www.hudzilla.org/phpbook/read.php/24_4_0]</li>
</ul>
<h3><a href="http://lab.bcb.iastate.edu/training/webdev/nmsu/"><strong>From Iowa State University</strong></a></h3>
<p>&#8220;Download the <a>yeast.txt</a> file from the website. Write a script that displays the names of all the protein-fragments contained in the file [the block of capital letters only].</p>
<p>&#8220;Adapt [the script above] to construct an array while you read through the file that contains all the titles of fragments. Now encapsulate that functionality in a PHP function GetFragmentTitles($fn) whereby $fn is name of the file and the return result is an array containing all the titles. The pseudocode for this function is as follows:</p>
<p><code>function GetFragmentTitles($fn) {<br />
// open file $fn<br />
// create a new array $titles<br />
// for each $line in file $fn<br />
// if $line represents a title<br />
// add the title to array<br />
// close the file<br />
return $titles;<br />
}</code></p>
<p>&#8220;Construct a form where the end-user can enter (part of) the name of a fragment. A second script subsequently searches the titles to see if (part of) the name occurs in the file. Report on how many fragments are found.</p>
<p>&#8220;Simulate a BLAST-search interface: a user can enter part of a sequence and your script should report if and where the subsequence is found. Use really small fragments to see if they show up multiple times. What do you report if no fragments are found?</p>
<ul>
<li> Extra: What if the user enters an empty string?</li>
<li> Extra: Can you think of a good use of the strtolower() function in this scenario?</li>
<li> Extra: Can you highlight the found sequence?&#8221;</li>
</ul>
<p><strong><a href="http://www.w3schools.com/quiztest/quiztest.asp?qtest=PHP">W3 Schools PHP Quiz </a></strong></p>


<p>Related posts:<ol><li><a href='http://www.joshcanhelp.com/helpful-software/906/trying-to-learn-photoshop-heres-what-to-concentrate-on/' rel='bookmark' title='Permanent Link: Trying to learn Photoshop? Here&#8217;s what to concentrate on'>Trying to learn Photoshop? Here&#8217;s what to concentrate on</a> <small>A while ago (at this point, a long while ago)...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.joshcanhelp.com/php/386/beginner-excercises-to-learn-php-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
