<?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>Tyler Ingram Dot Com &#187; PHP</title>
	<atom:link href="http://www.tyleringram.com/blog/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tyleringram.com</link>
	<description>Miscellanious Ramblings of a Web Developer in the Metro Vancouver area. Technology, Web Development, Photography, Computers and Outdoor Activities</description>
	<lastBuildDate>Tue, 31 Aug 2010 23:25:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Photo Portfolio Site Redone</title>
		<link>http://www.tyleringram.com/blog/photo-portfolio-site-redone</link>
		<comments>http://www.tyleringram.com/blog/photo-portfolio-site-redone#comments</comments>
		<pubDate>Sat, 03 Apr 2010 17:26:02 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=2395</guid>
		<description><![CDATA[Over the past little bit I&#8217;ve let one of my web sites dwindle down as I found it not as fun update. You see, with the previous incarnation of my photography portfolio website (www.tyleringramphotos.com) it was running on WordPress. I have had a few iterations with themes but essentially each blog post was a new [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past little bit I&#8217;ve let one of my web sites dwindle down as I found it not as fun update. You see, with the previous incarnation of my photography portfolio website (<a href="http://www.tyleringramphotos.com">www.tyleringramphotos.com</a>) it was running on WordPress. I have had a few iterations with themes but essentially each blog post was a new photo. I began to dislike the way that worked and thought through some new ways of displaying photos, but making it a less time consuming experience to maintain.</p>
<p>As many of you know (or if you don&#8217;t, you will now), I use Flickr a lot to showcase, display and share photos with people. With having a Pro Account on Flickr, the ability to upload an unlimited amount of photos is a great thing. Another aspect I like about storing photos on Flickr, is that it saves my web hosting packages from using up bandwidth when displaying photos to visitors. Flickr rarely (or never) goes down, so the photos are essentially available 24/7.</p>
<p>So what does Flickr have to do with my new photo portfolio website? A lot actually. In fact, the way I redesigned the new website is to utilize the Flickr API (Application Programming Interface) in such a way that to update my photos on my portfolio site, all I have to do is add them to Flickr in the appropriate location.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm5.static.flickr.com/4042/4487335838_2660172ebf_o.jpg" border="0" alt="Tyler Ingram Photography - Home Page" width="800" height="597" /></p>
<p>Using the magical powers of PHP in conjunction with Flickr&#8217;s API allows me to easily display and showcase photos that I find might be worthy of showing my photographic talents.</p>
<h3>So how does this all work?</h3>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2688/4487335636_3f001b911a_o.jpg" border="0" alt="Flickr Collection" width="800" height="361" /></p>
<p>First I set up a Collection in Flickr. A Collection is pretty much a larger scope of photos which typically content multiple Sets. In my case, I created a collection called Portfolio which is comprised of multiple Sets. Each Set is of a particular theme; Sports, Travel, Wildlife, People and HDR (or High Dynamic Range). All I have to do to add a photo to a particular location is to add it to a particular Set.</p>
<p>Being my biggest critic, I still hum and haw over photos that I think <em>might</em> be worthy enough to show people my skills behind the camera.</p>
<p>Once all the photos I wanted to show on the site were in their respected Flickr Sets, it was time to figure out how I want to display them and dive deeper into the Flickr API.</p>
<p>The front page (shown at the top of this post) will randomly select 12 photos from each Set to display. You can browse the sets one by one, or you can click on a photo within the set to display that photo right away. Cool right?</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2713/4487335936_11524d2b36_o.jpg" border="0" alt="Tyler Ingram Photography - A Set" width="800" height="373" /></p>
<p>When you click on a particular Set, it will display all the photos that belong to that Set as Thumbnails first. It will also give a brief description about the particular Set too.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2714/4487336362_10e02d8a52_o.jpg" border="0" alt="Tyler Ingram Photography" width="800" height="693" /></p>
<p>When you click on a particular photo it will display it on the page in all its beautiful glory! Typically shown at 800 pixels on the long edge. It will retrieve the photo&#8217;s Title and Description and display it.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2718/4486686307_86d2726a26_o.jpg" border="0" alt="Tyler Ingram Photography - Photo Info" width="800" height="550" /></p>
<p>You also might notice a small, white Question Mark at the top right corner of each photo as well. When you click on it, it will slide out and display some more information about the photo itself, usually the EXIF data as well as its keywords. All this information is retrieved from Flickr.</p>
<p>You can also navigate between photos by clicking on the arrows at the top of each photo. Hopefully this makes it a bit easier to look through the photos. The page load times shouldn&#8217;t be that bad either as all it does is fetches the photos as they are being displayed. I might look perhaps a more easier to use AJAX system which will not require page loads, though for now I think it works nicely.</p>
<p>There is also a <a href="http://tyleringramphotos.com/potd" target="_blank">Photo of the Day</a> (PotD) page for my portfolio site. This page works similarly to the rest of the site. Photos are added to the Flickr Set I can created for this particular feature. Any photos that I think are interesting, and other people might find interesting will be added to the Photo of the Day section. Again, being able to just add it to the Flickr Set, makes this an easy section to update.</p>
<p>The About and Contact pages are fairly static and nothing really exciting. The Contact page has a form that people can fill out to get in touch with me, it is also generated via PHP and does some nice massaging magic for when I receive the messages.</p>
<p>Another cool thing to make mention about the way I created this website is the use of a singal configuration file. With that configuration file, I could change the photos shown by just changing a view variables. I could display a Flickr Collection that you, yourself have set up and it will display any photos you have within the sets within that Collection of yours. Who knows, perhaps other people might like something similar to this right? Perhaps I can one day include theme support? Ah, the possibilities could be endless!</p>
<h3>Possible Future Updates:</h3>
<p>I am always thinking of new ways to not only share and display my photography, but also to make my websites a bit more interesting and exciting. Some other ideas I have for the site but will need some more thought are:</p>
<ul>
<li>Purchasing of Photos with a Shopping Cart</li>
<li>Easier way to navigate between Photos &#8211; Perhaps AJAX based</li>
<li>More Photos!</li>
</ul>
<p>What do you think of this particular newly redesign photography portfolio website? What do you like/dislike about it? What would you like to see on it? I am always wanting feedback about the work I do in both the Photography department and the Web Design/Developing department, so I hope you will leave a comment with your thoughts/suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/photo-portfolio-site-redone/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New WordPress Layout Here</title>
		<link>http://www.tyleringram.com/blog/new-wordpress-layout-here</link>
		<comments>http://www.tyleringram.com/blog/new-wordpress-layout-here#comments</comments>
		<pubDate>Sat, 19 Dec 2009 00:45:11 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[redesign]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=1992</guid>
		<description><![CDATA[Alright over the past couple days (well today and yesterday) I&#8217;ve been tinkering around with a new layout here for Tyler Ingram dot Com. It&#8217;s not an entirely new layout, but right off the bat you probably have noticed the various changes I implemented.
Why Change the Layout?
Some people fear change, I love change (well for [...]]]></description>
			<content:encoded><![CDATA[<p>Alright over the past couple days (well today and yesterday) I&#8217;ve been tinkering around with a new layout here for Tyler Ingram dot Com. It&#8217;s not an entirely new layout, but right off the bat you probably have noticed the various changes I implemented.</p>
<h3>Why Change the Layout?</h3>
<p>Some people fear change, I love change (well for the most part). I wanted a new layout that would give more emphasis on my Photography. After all, I seem to do more blog posts on Photography than anything else really.</p>
<p>Some of you know about <a href="http://www.tyleringramphotos.com" target="_blank">http://www.tyleringramphotos.com</a>. It was a photoblog that I ran somewhat separately from this site, but I found over time, I would be just repeating a lot of the same photos. I tried to make the photoblog more of a portfolio site, but decided to just let it go and concentrate my photo efforts here.</p>
<p>I also wanted to change it up before our trip down to Costa Rica. My camera is coming with me and I will be sure to post magnificent photos of the area we will be in, and thought increasing the space for photos here would be a good idea.</p>
<h3>What Changed?</h3>
<p>I pushed the navigation menu up above the entire site. I thought it was a nice way of getting it out of the way.</p>
<p>I expanded the width of the site to 1000 pixels wide. This will help accommodate the size of the photos I wish to display which will be 800 pixel wide. This also eliminates the need for using the Lightbox that the 500 pixel wide photos currently use. According to Flickr&#8217;s ToS, the use of the lightbox technically takes away from the experience of using Flickr, so I guess that is a bad thing.</p>
<p>The header image is still pulled from my Flickr stream at random. I increased the length to the full 1000 pixels wide and increased the height to 250 pixels. this gives a much larger header image. Because my photos are typically 800 pixels wide on Flickr, I did use PHP&#8217;s GD Library to increase the size of the photo. There is small loss of quality of course, but I still think it looks really cool.</p>
<p>You will notice a &#8220;Featured Post&#8217; slideshow. It is Ajax based and loads with both Firefox and IE (why are you using IE still anyway). I haven&#8217;t had time to play in the other browsers, but according to <a href="http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider" target="_blank">the place I got it from</a>, it&#8217;s supposedly compatible. Let me know if you experience issues with it. I think it&#8217;s cool and have always wanted one.</p>
<p>I got rid of my Sidebar. Yup, I started hating it anyway. I&#8217;ve moved the Categories, Recent Posts and Recent Comments to the footer of the site. This keeps the main focus hopefully on my big beautiful photos. Right?</p>
<p>The main content will accommodate my 800 pixel wide photos, with room to spare. After all, since I love Photography so much, I thought it would be best to share the photos in a nice, large way.  Such as this photo:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2662/4191174100_9bb3b585ba_o.jpg" border="0" alt="IMG_0208" width="800" height="600" /></p>
<p>Isn&#8217;t that beautiful? The rising sun off the beaches of Punta Cana, Dominican Republic. If you have to scroll to see that photo, you really need to upgrade your monitor. Though technically you should still be able to see most of it on a 1024&#215;768 resolution, but I don&#8217;t know why you&#8217;re running your resolution that low to begin with.</p>
<p>Added some cute little Social Media icons near the header. No need to show how many people follow me right?</p>
<p>The main page (index page) will show up to 5 posts with excerpts along with a 500 pixel wide photo. The excerpt code is custom, which includes a custom call to the WordPress database (MySQL) so strips out any HTML it sees. It works better than the default WordPress function the_excerpt(), or at least I think so.  I also have a function that pulls the first image from the post and uses it as a 500 pixel wide thumbnail, same as before but that was 100 pixel wide. I also tweaked it a bit to load quicker (hopefully).</p>
<p>I guess that is about it. There have been some little tweaks to the code here and there. Primarily to the code that handles the recreation of images for the various locations on my site.</p>
<h3>What&#8217;s Next?</h3>
<p>I&#8217;m sure I&#8217;ll tweak things as I find them. If you notice anything out of place, don&#8217;t hesitate to tell me here via Comments, Twitter or even contact me via my Contact me page.</p>
<p>I will be writing a small WordPress plugin to deal with my contact form. Currently I use cFormsII but it is just too much and always gets stuck in my spam filter. I will look at creating a small, simple (or minimalist) contact form.</p>
<p>I might look at creating a WordPress plugin to better handle the &#8220;Featured Post&#8221; Slide show. For now it is changed manually (via HTML).</p>
<h3>What do you think?</h3>
<p>I&#8217;m alright with criticism. If you like it, what do you like about it? If you don&#8217;t like it, what part(s) and what would you do to make it better? Let me know via the comments section!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/new-wordpress-layout-here/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Making Things Dynamic</title>
		<link>http://www.tyleringram.com/blog/making-things-dynamic</link>
		<comments>http://www.tyleringram.com/blog/making-things-dynamic#comments</comments>
		<pubDate>Fri, 09 Oct 2009 23:28:42 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=1827</guid>
		<description><![CDATA[
The past few hours I have been pretty geeky. I&#8217;ve been looking into Flickr&#8217;s API (application programming interface) and how I can monkey around with it and PHP. What did I want to accomplish? At the beginning I didn&#8217;t really have a goal, I wanted to see what I could do with it, how I [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding-left: 2px; width: 250px;"><!--adsense#250x250Single--></div>
<p>The past few hours I have been pretty geeky. I&#8217;ve been looking into Flickr&#8217;s API (application programming interface) and how I can monkey around with it and PHP. What did I want to accomplish? At the beginning I didn&#8217;t really have a goal, I wanted to see what I could do with it, how I can access my photos and from there I would figure out something fun to implement.</p>
<p>Well it seems I have figured out something cool. If you&#8217;ve noticed the larger photo on the header of my page, the one above the Flickr RSS thumbnails, it is a bit more dynamic than usual. Previously I had 5 (I think) header images that I created in Photoshop and was using PHP to randomly insert on when the page refreshed. Now I can be a bit lazy at times and I haven&#8217;t looked at updating those 5 photos in a while, so I was thinking how I could incorporate my Flickr photos with my website in order to help give my photography a bit more exposure.</p>
<p>So what&#8217;s different? Go ahead and refresh the page, it should show a random photo of mine from Flickr. Though there is a catch, it isn&#8217;t the fastest system yet and it doesn&#8217;t always show something cool. Let&#8217;s see if I can explain the functioning behind how it currently works. I might have a revision or two, but for now I think it&#8217;s pretty cool!</p>
<ol>
<li>Pull the last 400 photos from my Flickr Photostream (pulls XML data)</li>
<li>Select a random photo using PHP&#8217;s rand() function and create URL for photo</li>
<li>Check to see if it is in landscape or portrait orientation, discard if it&#8217;s portrait</li>
<li>Select the middle third of the photo, remember the &#8220;<a href="http://digital-photography-school.com/rule-of-thirds" target="_blank">Rule of Thirds</a>&#8221; for photography? Hopefully this is the more interesting portion of the photo. If not, tough luck! Typically my photos are 800&#215;533 on Flickr</li>
<li>Create a new 850&#215;118 jpeg image and copy random photo into its placeholder, resize to width if needed</li>
<li>Display photo in all its glory as my header image</li>
</ol>
<p>Not bad for a couple of hours of work. Either way it allows for a more dynamic header and some more &#8216;freshness&#8217; too!</p>
<p>I am looking for your feedback on this! Is it slow to load? Do the photos suck? Is it a cool idea? Is it random enough? What do you think?</p>
<p>I can just sit here and refresh my screen all day looking at whatever random photo is pulled from Flickr.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/making-things-dynamic/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Easy Way To Limit Words In a String and WordPress</title>
		<link>http://www.tyleringram.com/blog/php-easy-way-to-limit-words-in-a-string-and-wordpress</link>
		<comments>http://www.tyleringram.com/blog/php-easy-way-to-limit-words-in-a-string-and-wordpress#comments</comments>
		<pubDate>Fri, 17 Oct 2008 17:26:10 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[the_excerpt]]></category>
		<category><![CDATA[word count]]></category>
		<category><![CDATA[word limit]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=762</guid>
		<description><![CDATA[
I was looking over my index page and wanted to modify WordPress&#8217; pre-built the_excerpt() function which limits the amount of words displayed for a particular post on my front page without cutting words in half. The draw back from using the built-in the_excerpt() function is that you can not modify how it works, there is [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; width:250px; padding-left: 2px;"><!--adsense#250x250Single--></div>
<p>I was looking over my index page and wanted to modify WordPress&#8217; pre-built <span style="color: #ff0000;"><em>the_excerpt()</em></span> function which limits the amount of words displayed for a particular post on my front page without cutting words in half. The draw back from using the built-in <em><span style="color: #ff0000;">the_excerpt()</span></em> function is that you can not modify how it works, there is not option to give the function arguments such as how many words to display.</p>
<p>So how would I go about creating a function to display the amount of words I want in the way I want it? Well I had to take a look at how I display the content of the front page. This isn&#8217;t typical of most blogs but I run custom MySQL query and then loop through each post. Sure this sounds like the WordPress&#8217; Loop but doing it this way allows me to customize the information in the way I want it.</p>
<p><strong>So What Did I Do?</strong></p>
<p style="text-align: center;"><img class="size-full wp-image-768 aligncenter" title="PHP Limit Words" src="http://www.tyleringram.com/wp-content/uploads/2008/10/excerptcode.jpg" alt="" width="350" height="323" /></p>
<p>Once I&#8217;ve created the MySQL query and get the results I then loop through the results that are found. This is pretty straight-forward and not too difficult to do.</p>
<p>Within the loop I extract the information I need using the <span style="color: #ff0000;"><em>setup_postdata($post)</em> </span>function. This allows me to use the built-in functions as well as allows me access to the data in variables for my customization needs.</p>
<p>Now I need an easy way of limited the output of the <span style="color: #ff0000;"><em>$post-&gt;post_content</em></span> data I now have access to.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> showBrief<span class="br0">&#40;</span><span class="re0">$str</span>, <span class="re0">$length</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="re0">$str</span> = <a href="http://www.php.net/strip_tags"><span class="kw3">strip_tags</span></a><span class="br0">&#40;</span><span class="re0">$str</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="re0">$str</span> = <a href="http://www.php.net/explode"><span class="kw3">explode</span></a><span class="br0">&#40;</span><span class="st0">&quot; &quot;</span>, <span class="re0">$str</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">return</span> <a href="http://www.php.net/implode"><span class="kw3">implode</span></a><span class="br0">&#40;</span><span class="st0">&quot; &quot;</span> , <a href="http://www.php.net/array_slice"><span class="kw3">array_slice</span></a><span class="br0">&#40;</span><span class="re0">$str</span>, <span class="nu0">0</span>, <span class="re0">$length</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
<p>Seems pretty easy right? I think so. I strip the tags (html tags) from the content so that it won&#8217;t show hyperlinks or images and then I explode the information based on the spaces between words so it goes into an array. I then implode (piece together) the array but ensure the array I am piecing back together is only a certain number of words.</p>
<p>Now you just need to <span style="color: #ff0000;"><em>echo showBrief($post-&gt;post_content, 75)</em></span> and there you go! It limits the output to 75 words or whatever you specify with ease.</p>
<p>This makes it so that the output doesn&#8217;t cut a word off at the character level, so it will only output full words which, I think, looks better than words that have been chopped off.</p>
<p style="text-align: center;"><img class="size-medium wp-image-769 aligncenter" title="WordPress Advanced Options - Excerpt" src="http://www.tyleringram.com/wp-content/uploads/2008/10/excerpt-300x97.jpg" alt="" width="300" height="97" /></p>
<p>The other option which is to create the excerpt yourself via the Advanced Options when writing a new Post. Though creating a customized excerpt this way can have its advantages especially for SEO and keyword implementation within a particular post.</p>
<p>Perhaps one day WordPress will allow you to specify arguments for the function <span style="color: #ff0000;"><em>the_excerpt()</em></span>. As you can see from the above code, it shouldn&#8217;t be that hard to change right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/php-easy-way-to-limit-words-in-a-string-and-wordpress/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using PHP LDAP To Find Which Groups A User Belongs To</title>
		<link>http://www.tyleringram.com/blog/using-php-ldap-to-find-which-groups-a-user-belongs-to</link>
		<comments>http://www.tyleringram.com/blog/using-php-ldap-to-find-which-groups-a-user-belongs-to#comments</comments>
		<pubDate>Tue, 03 Jun 2008 15:01:29 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=412</guid>
		<description><![CDATA[
One of the tasks I have been looking into at work is the ability to use PHP to authenticate users against a Windows Active Directory (AD). After searching around on the internet I did manage to find a great little tutorial that helped explain the steps in searching the AD for a particular user and [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-left: 2px; float: right; width: 250px;"><!--adsense#250x250Single--></div>
<p>One of the tasks I have been looking into at work is the ability to use PHP to authenticate users against a Windows Active Directory (AD). After searching around on the internet I did manage to find a great little tutorial that helped explain the steps in searching the AD for a particular user and then if they existed to authenticate them with the submitted credentials.</p>
<p>While writing this post I have noticed that the blog that tutorial was written on is currently undergoing some transformations and I won&#8217;t be able to link to it yet. It was a fairly good tutorial and it allowed me to easily access our company&#8217;s AD with using the proper authentication to look up user accounts and authenticate them properly.</p>
<p>The next task that was to create some sort of structured access system based on the groups the user belonged too. The code below assumes you have been able to previously authenticate a user on the AD using PHP and their account information is store in the array variable $user.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="re0">$groups</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>; </p>
<p><span class="co1">// Loop through the groups that the user is a `memberof`</span><br />
<span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$user</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;memberof&#8217;</span><span class="br0">&#93;</span> <span class="kw1">as</span> <span class="re0">$group</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="co1">// extract Group name from string</span><br />
&nbsp; <span class="re0">$temp</span> = <a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$group</span>, <span class="nu0">0</span>, stripos<span class="br0">&#40;</span><span class="re0">$group</span>, <span class="st0">&quot;,&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="co1">// Strip the CN= and change to lowercase for easy handling</span><br />
&nbsp; <span class="re0">$temp</span> = <a href="http://www.php.net/strtolower"><span class="kw3">strtolower</span></a><span class="br0">&#40;</span><a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;CN=&quot;</span>, <span class="st0">&quot;&quot;</span>, <span class="re0">$temp</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;{$temp}&lt;br /&gt;&quot;</span>; &nbsp; <span class="co1">// Print out Group&#8217;s name</span><br />
&nbsp; <span class="re0">$groups</span><span class="br0">&#91;</span><span class="br0">&#93;</span> .= <span class="re0">$temp</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw2">?&gt;</span></div>
<p>Pretty cool and pretty easy to do right? Now all you need to do is check to see whether or not the user belongs to the particular groups you need them to belong to. This can be in the form of an array or a loop to match an array against a particular group such as:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
&nbsp; <span class="co1">// Regular User</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/in_array"><span class="kw3">in_array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;RegUser&#8217;</span>, <span class="re0">$groups</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$_SESSION</span><span class="br0">&#91;</span><span class="st0">&#8216;thisuser&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;userlevel&#8217;</span><span class="br0">&#93;</span> = <span class="nu0">1</span>;<br />
&nbsp; <span class="co1">// Moderator</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/in_array"><span class="kw3">in_array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Moderator&#8217;</span>, <span class="re0">$groups</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$_SESSION</span><span class="br0">&#91;</span><span class="st0">&#8216;thisuser&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;userlevel&#8217;</span><span class="br0">&#93;</span> = <span class="nu0">3</span>;<br />
&nbsp; <span class="co1">// Administrator</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/in_array"><span class="kw3">in_array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Admin&#8217;</span>, <span class="re0">$groups</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$_SESSION</span><span class="br0">&#91;</span><span class="st0">&#8216;thisuser&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;userlevel&#8217;</span><span class="br0">&#93;</span> = <span class="nu0">5</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>So really it isn&#8217;t as difficult as I first thought it might have been but it&#8217;s pretty interesting how a company can easily use one central location for their user database and have multiple internal websites authenticate against it. I personally will be looking to change some of our internal websites to work with PHP&#8217;s LDAP library so that I do not need to use multiple user tables for authentication and permissions.</p>
<p>This would work mainly for workplace intranet websites as opposed to regular internet websites. Though if people could utilize a system such as <a title="Wikipedia - Windows Live ID aka .NET Passport" href="http://en.wikipedia.org/wiki/Microsoft_Passport" target="_blank">Windows Live ID</a> or <a title="Wikipedia - OpenID" href="http://en.wikipedia.org/wiki/OpenID" target="_blank">OpenID</a> then we&#8217;d ever only need 1 username/password to login into the billions of websites out there right? After all how many various username/password combinations do you currently use? I have at least 10 variations for various websites I have to keep track of in my head all with different passwords.</p>
<p>To highlight the above PHP code I used the <a title="Dean's Code Highlighter WordPress Plugin" href="Deanâ€™s Code Highlighter v1.2 " target="_blank">Dean&#8217;s Code Highlighter</a> WordPress Plugin. I have been searching for a decent, easy to use WordPress plugin that allowed me to highlight scripting snippets or scripts when I wrote about them. If you post HTML, CSS, PHP, or any other sort of language I recommend you checking out this plugin.</p>
<div style="text-align: center"><!--adsense#Posts--></div>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/using-php-ldap-to-find-which-groups-a-user-belongs-to/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Undefined json_encode function?</title>
		<link>http://www.tyleringram.com/blog/undefined-json_encode-function</link>
		<comments>http://www.tyleringram.com/blog/undefined-json_encode-function#comments</comments>
		<pubDate>Fri, 25 Apr 2008 16:40:36 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=373</guid>
		<description><![CDATA[For some strange reason one of my php scripts at work stopped functioning and was throwing a fatal error complaining that the json_encode() function was undefined. I thought this was a bit strange since I could of sworn the previous week it was working fine. I am using the json_encode() function to allow javascript to [...]]]></description>
			<content:encoded><![CDATA[<p>For some strange reason one of my php scripts at work stopped functioning and was throwing a fatal error complaining that the json_encode() function was undefined. I thought this was a bit strange since I could of sworn the previous week it was working fine. I am using the json_encode() function to allow javascript to properly parse data that it requests via AJAX. It allows the parsing of database information in a more efficient manner than other methods I have seen.</p>
<p>It seems that the version of PHP previous to 5.2 do not have the json_encode() function available and this can be a bit of a pain when working with ajax scripts that request information from a MySQL database. I hopefully have found a quick solution by recreating the proper output for those who are running PHP versions 5.1 and older.</p>
<blockquote><p><code><br />
$qry = mysql_query("SELECT * FROM blah");<br />
$results = mysql_fetch_array($qry);</code></p>
<p>$json = &#8220;{&#8220;;<br />
foreach ($results as $field =&gt; $value) {<br />
$json = $json . &#8216;&#8221;&#8216; . $field .&#8217;&#8221;:&#8221;&#8216;. $value .&#8217;&#8221;,&#8217;;<br />
}<br />
$json = substr($json, 0, strlen($json)-1);<br />
$json = $json . &#8216;}&#8217;;</p>
<p>echo $json;</p></blockquote>
<p>What this does is it will go through your previous MySQL query results and insert the field name along with its value into a string which can then be outputted in the proper format for JavaScript to properly parse the data.</p>
<p>This seems to be the quickest way to recreate a json_encode output when it is not available to those who are using PHP version less than 5.2. I have seen various PHP classes on the internet that are bloated and do far more than they really should when you&#8217;re just trying to create the function. One PHP class I sawÂ  had 50 lines of code! My above example to recreate the function is 6 lines of code (doesn&#8217;t include the MySQL lines). Another PHP class I found was broken in various spots and was said to be &#8216;complete&#8217; and &#8216;functional&#8217;. Oh well, I hope my example helps people out there who need to fix scripts to work with older versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/undefined-json_encode-function/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SugarCRM: SugarCON 2008 Day 1</title>
		<link>http://www.tyleringram.com/blog/sugarcrm-sugarcon-2008-day-1</link>
		<comments>http://www.tyleringram.com/blog/sugarcrm-sugarcon-2008-day-1#comments</comments>
		<pubDate>Thu, 07 Feb 2008 01:15:00 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=15</guid>
		<description><![CDATA[

Well if you have not heard about SugarCRM it is an open source CRM (Customer Relationship Management) software package that utilizes the language PHP to interact with a MySQL database. 
What does that mean for you? Well depending on your organization&#8217;s size it can mean you can obtain fully-featured contact management software that has an [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img src="http://www.tyleringram.com/photos/sugarcon/sugarcon.jpg" alt="SugarCRM: SugarCON 2008" />
</div>
<p class="MsoNormal">Well if you have not heard about <a href="http://www.sugarcrm.com" target="_blank">SugarCRM</a> it is an open source CRM (Customer Relationship Management) software package that utilizes the language PHP to interact with a MySQL database. </p>
<p class="MsoNormal">What does that mean for you? Well depending on your organization&rsquo;s size it can mean you can obtain fully-featured contact management software that has an upfront cost of $0. The only thing it really requires is a web server running either Windows or *nix operating system. To obtain PHP and MySQL will cost you $0 as well.<span style="">&nbsp; </span>This can be a great software package for those who are wishing to start up a business but do not want to spend money on things such as Maximizer or ACT.</p>
<p class="MsoNormal"><strong>I don&rsquo;t believe you, nothing is free!</strong> </p>
<p class="MsoNormal">The Community version of SugarCRM is free, though you only get technical support from the SugarCRM Community. If you buy the Professional or Enterprise version then you get technical support from SugarCRM&rsquo;s support department. The online Sugar Community is huge though and very helpful if you choose not to pay. Though depending on your needs the paid versions do offer some other features you might need but I&rsquo;ll not go into that as you can check them out at their website.</p>
<p class="MsoNormal"><strong>Open Source is here to stay.</strong></p>
<p class="MsoNormal">What is Open Source? Well the quick version is software companies allow you access to the code. This allows you to tailor the program to your needs and even help the company create better features or improve existing ones. It allows for better customization as well.</p>
<p class="MsoNormal"><strong>That&rsquo;s all great, what about SugarCON?</strong></p>
<div align="center"><img alt="SugarCRM: SugarCON 2008 - Hayes Ballroom" src="http://www.tyleringram.com/photos/sugarcon/IMG_0004.jpg" />
</div>
<p class="MsoNormal">SugarCON is a Customer and Developer conference held every year by SugarCRM and a few vendors such as MySQL, Microsoft, Sun Microsystems, RIM (Research In Motion) to name a few. They offer various small workshops (more like informational sessions) about various aspects of the SugarCRM package including where it is headed in the future.</p>
<p class="MsoNormal">They also have Keynote speakers. The first day the CEO of SugarCRM <strong>John Roberts</strong> gave everyone an introduction about SugarCRM and various aspects into the world of CRM as well as his company. The &lsquo;<a href="http://fakesteve.blogspot.com" target="_blank">Fake Steve Jobs</a>&rsquo;, aka <strong>Daniel Lyons,</strong> of Frobes talked about the open source community and what was in store for the industry. He also poked fun at Microsoft and other large companies. After lunch the President and CEO of Sun Microsystem&#39;s <span class="p"><strong>Jonathan Schwartz</strong></span>&nbsp; also talked.<span style="">&nbsp; </span>Recently Sun purchased MySQL for a lovely sum of $1 Billion and he gave his thoughts and reason behind the acquisition. MySQL&rsquo;s business model and that they are expected to have $100 Million in annual sales were a couple of the reasons for the purchase though they want to be able to help MySQL grow and be more scalable as customers&rsquo; needs increase for database software. They also plan on keeping it free.</p>
<p class="MsoNormal">Overall the first day was pretty informative. I have learned a couple things about SugarCRM that could be useful for my employer such as how the new version of SugarCRM (ver 5.0) is more modular and easier to customize for our purposes or that setting up scheduled email campaigns for our sales department is easy to do with cron jobs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/sugarcrm-sugarcon-2008-day-1/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My First Facebook Application Was A Bust</title>
		<link>http://www.tyleringram.com/blog/my-first-facebook-application-was-a-bust</link>
		<comments>http://www.tyleringram.com/blog/my-first-facebook-application-was-a-bust#comments</comments>
		<pubDate>Thu, 17 Jan 2008 23:13:43 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=22</guid>
		<description><![CDATA[
While trying to increase my web programming knowledge I was thinking to myself: What can I learn that might benefit other people? That&#8217;s when I thought about Facebook and how it supports PHP applications. 
The next thing was to think of a relatively easy project that would allow me to learn the Facebook programming environment [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img alt="Facebook - Interacting with Applications via PHP" src="http://www.tyleringram.com/photos/FB/code.jpg" /></div>
<p>While trying to increase my web programming knowledge I was thinking to myself: What can I learn that might benefit other people? That&rsquo;s when I thought about <a href="http://www.facebook.com" target="_blank">Facebook</a> and how it supports PHP applications. </p>
<p class="MsoNormal">The next thing was to think of a relatively easy project that would allow me to learn the Facebook programming environment and I thought about what Facebook is to some people; Facebook is a fun stalker web application! Ok so stalking isn&rsquo;t a good thing but what else do you do when you&rsquo;re on Facebook? You look at your friends&rsquo; profiles to see what they have been up to right? Well the idea I came up with (as simple as it might be) was to show to the visitors (your friends) the last time you were on your profile.</p>
<p class="MsoNormal">Currently Facebook tells you if you&rsquo;re online or if you have been online in the past 5 minutes right? Well I wanted to see if I could bump that up a notch and show people down to the minutes when you last accessed your account. <span style="">&nbsp;</span>Why would I want to do that? Well if I haven&rsquo;t seen someone on Facebook for a while I am curious as to the last time they were actually on their account.</p>
<p class="MsoNormal">Facebook (being one of the most popular Social Networking sites in the world) is actually an interesting concept when it comes to user created applications. Facebook does not host any of the user-made creations but simply &lsquo;requests&rsquo; them from remotely (third party) hosted web servers. <span style="">&nbsp;</span>This in itself is pretty efficient; I guess this is so the Facebook servers can use their resources for other things. So if you find an application being slow to respond, chances are it&rsquo;s the third party server of the application that is having troubles.</p>
<p class="MsoNormal">Learning how Facebook allows you to add application is pretty straight forward, especially if you are already into web development using languages such as PHP, Python etc. <a target="_blank" href="http://developers.facebook.com/">Their developer&rsquo;s area</a> is pretty well stocked with helpful information about interfacing your scripts with Facebook and there are a few good example of creating some basic applications. They have their own Markup Language (similar to HTML), easily useable PHP classes for interacting and retrieving information, as well as their own SQL based functions to help you retrieve user information at a more advanced level.</p>
<p class="MsoNormal">For my project all I needed was access to a MySQL Server (check) and a web server capable of processing PHP v5 (check). The idea behind the project was that every time you access your profile, a query would store the Unix Timestamp in the database along with your Facebook uid (user id). It was pretty quick and using only about 10 lines I could create the script and have it display to the user and their visitors with ease. The downside to it though, is the way Facebook actually works in regards to the Profile page (the page which your visitors or friends get to see). </p>
<p class="MsoNormal">Facebook is a &lsquo;PUSH&rsquo; environment. In simple terms, it caches everything on your profile to display it to your visitors and only updates when you physically interact with the applications. What does this mean for my first application? People would have to physically go to my application (the settings page) every time they logged into Facebook so that the timestamp would be properly recorded.</p>
<div style="float: left; width: 300px; margin-right: 5px;"><img alt="LastOn - My First Facebook Application" src="http://www.tyleringram.com/photos/FB/laston.jpg" /></div>
<p class="MsoNormal">As you can see from the image it shows me being last on 22 hours ago. Don&rsquo;t pay attention to the minutes, my math calculation seems to be a bit off. Anyway, 22 hours ago was the last time I looked at my applications settings page so that is why it seems as if I haven&rsquo;t logged in, in almost 24 hours! If you know me you know I check Facebook at least hourly if not more often.</p>
<p class="MsoNormal">So what does this mean for me? It means my ultimate stalker application for Facebook is a bust. It seems I am unable to have my scripts act the way I want to which is a bit disappointing. My next step is to perhaps figure out another Facebook application I can create that will work the way I expect it to and which will hopefully be useful to people out there. <span style="">&nbsp;</span>If you have an idea for a Facebook application I am interested to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/my-first-facebook-application-was-a-bust/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Hide Affiliate Links The PHP Way</title>
		<link>http://www.tyleringram.com/blog/hide-affiliate-links-the-php-way</link>
		<comments>http://www.tyleringram.com/blog/hide-affiliate-links-the-php-way#comments</comments>
		<pubDate>Mon, 15 Oct 2007 00:10:16 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[affiliate]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=51</guid>
		<description><![CDATA[A recent comment that was left in one of my posts was asking how they could utilize PHP to create a redirect for their Affiliate links. After a few moments of brainstorming a decent solution presented itself to me. Using a couple of lines of code (of course depending on how many affiliates you use) [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.tyleringram.com/blog/301-Redirect:-PHP-Style#comments-893">recent comment that was left</a> in one of my posts was asking how they could utilize PHP to create a redirect for their Affiliate links. After a few moments of brainstorming a decent solution presented itself to me. Using a couple of lines of code (of course depending on how many affiliates you use) you can redirect people to any location you wish. To take it one step further I will also show how to make use of the .htaccess file on your server (granted that you’re using Apache as web server) to mask the links and make them SEO friendly as well.</p>
<p class="MsoNormal"><strong>The PHP code to redirect (created in a file called redirect.php):</strong></p>
<p>[code]<br />
&lt;?php<br />
if(isset($_GET['aff'])) {<br />
switch($_GET['aff']) {<br />
case "tla":<br />
header("Location: http://URL.OF.AFFILIATE.LINK.HERE");<br />
exit();<br />
break;<br />
case "reviewme":<br />
header("Location: http://URL.OF.REVIEWME.AFFILIATE.LINK.HERE");<br />
exit();<br />
break;<br />
}<br />
?&gt; [/code] <span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;"></span></p>
<p class="MsoNormal">The line <em><span style="font-family: &quot;Courier New&quot;;">if(isset($_GET['aff']))</span></em> checks the URL for a the argument aff as in: <a href="../../redirect.php?aff=tla">http://www.tyleringram.com/redirect.php?aff=tla</a></p>
<p class="MsoNormal">The line <span style="font-family: &quot;Courier New&quot;;"><em>switch($_GET['aff']))</em> </span>will process the argument and handle it differently based on what it finds the argument to be.</p>
<p class="MsoNormal">Now if you want the URL to be SEO friendly you can do so by editing your .htaccess file in the root of your web site on you server.</p>
<p class="MsoNormal"><strong>Editing .htaccess file to work for masking or hiding Affiliate link:</strong></p>
<p>[code]<br />
RewriteEngine On<br />
RewriteRule ^go/([A-z0-9\-]+)$ redirect.php?aff=$1<br />
[/code]</p>
<p class="MsoNormal">If you already have <em>RewriteEngine On</em> in your .htaccess file you will not need to add that line in again. What we are telling Apache to do is convert one URL to act as another. So when you enter <a href="http://www.tyleringram.com/go/tla">http://www.tyleringram.com/go/tla</a>, Apache will process this and call the redirect.php file and anything after the last slash will be used as the argument for the page.</p>
<p class="MsoNormal">If you have any comments, suggestions about the above post in regards to using PHP to create an Affiliate redirect please leave a comment.</p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/hide-affiliate-links-the-php-way/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Go About Learning PHP</title>
		<link>http://www.tyleringram.com/blog/how-to-go-about-learning-php</link>
		<comments>http://www.tyleringram.com/blog/how-to-go-about-learning-php#comments</comments>
		<pubDate>Sat, 20 Jan 2007 00:52:48 +0000</pubDate>
		<dc:creator>Tyler Ingram</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.tyleringram.com/?p=192</guid>
		<description><![CDATA[I&#39;ve seen it posted a few times where people ask: What&#39;s the best way to learn PHP? Well there are many ways to learn PHP but I still favor the route that I took.
When I first started to learn PHP it was because I wanted to be able to create dynamic content for web pages. [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">I&#39;ve seen it posted a few times where people ask: <strong>What&#39;s the best way to learn PHP?</strong> Well there are many ways to learn PHP but I still favor the route that I took.</p>
<p class="MsoNormal">When I first started to learn PHP it was because I wanted to be able to create dynamic content for web pages. When I want to learn something I need to find a reason to learn it and a real life use for it else it won&#39;t stick into my head. Luckily for me I was in charge of production quality assurance for my employer and we stored things using excel. I changed that by going to MS Access, but I wanted even more control over the data being entered so there could be less human error. So then came along wanting to learn <a href="http://www.mysql.com" target="_blank">MySQL</a> (to me it&#39;s the next step from using MS Access) but then how would I interface a MySQL Database to the information I wanted to put into it? PHP was my answer.</p>
<p class="MsoNormal">The two resources I recommend to anyone who wants to learn PHP in a step-by-step manner are two very well done books:</p>
<p class="MsoNormal"><img src="/photos/VisualQuickPHP.jpg" alt="PHP For The World Wide Web" />
</p>
<p class="MsoNormal"><a href="http://www.amazon.com/World-Second-Visual-QuickStart-Guide/dp/0321245652/sr=1-2/qid=1169311015/ref=pd_bbs_2/103-3562504-4766232?ie=UTF8" target="_blank">PHP for the World Wide Web, Second Edition (Visual Quickstart Guide)</a></p>
<p class="MsoNormal"><img src="/photos/VisualQuickProPHP.jpg" alt="PHP and MySQL for Dynamic Web Sites" />
</p>
<p class="MsoNormal"><a href="http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321336577/sr=1-1/qid=1169311167/ref=sr_1_1/103-3562504-4766232?ie=UTF8s=books" target="_blank">PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)</a></p>
<p class="MsoNormal">Both of these books have real life usable examples that are easy to follow and understand. They do the basic of echoing text to the browser, use of Cookies and Sessions to the more complicated dynamic content of an eCommerce type site with photo gallery and shopping cart. Also they highlight and explain the code in full detail in a way that won&#39;t confuse or get the reader lost and frustrated. Did I mention they also talk about a user management system? That seems to be quite popular among websites nowadays.</p>
<p class="MsoNormal">Two other resources that I recommend to anyone who is learning PHP or who is a veteran to PHP but needs a bit of help or advice would be these two great sites:</p>
<p class="MsoNormal"><a href="http://www.phpfreaks.com" target="_blank">PHPFreaks.com</a> &#8211; They have oodles of tutorials, articles and a huge forum with people who are eager and knowledgeable to help with any issues you might have. On the <a href="http://ww.phpfreaks.com/forums" target="_blank">PHPFreaks forums</a> I can be found by the name of SharkBait and I tend to try and help others as much as possible, it also allows me to learn more! </p>
<p class="MsoNormal"><a href="http://www.php.net" target="_blank">Php.net </a>- The official website of the open source PHP project. You can find all sorts of information here from the actually manual of the PHP language, information on conferences and much more.<span style="">&nbsp; </span>This is also where you download the binaries of PHP (for both Linux and Windows) in case you need to install or upgrade your PHP version. If I get stuck or forget what a function does I do a quick search on their site and voila, I find the information as well as feedback on the best way to use it.</p>
<p class="MsoNormal">Of course there are many other sites out there that offer tutorials and help when it comes to PHP programming but I do like to say: When in doubt, <a href="http://www.google.com" target="_blank">Google it</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyleringram.com/blog/how-to-go-about-learning-php/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
