<?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>MakeUseOf &#187; php</title>
	<atom:link href="http://www.makeuseof.com/tags/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.makeuseof.com</link>
	<description>Cool Websites, Software and Internet Tips</description>
	<lastBuildDate>Fri, 10 Feb 2012 04:31:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Make A Product Review Database With WordPress: Custom Post Types, Custom Fields, Featured Images &amp; Widgets!</title>
		<link>http://www.makeuseof.com/tag/product-review-database-wordpress-custom-post-types-custom-fields-featured-images-widgets/</link>
		<comments>http://www.makeuseof.com/tag/product-review-database-wordpress-custom-post-types-custom-fields-featured-images-widgets/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 17:30:16 +0000</pubDate>
		<dc:creator>James Bruce</dc:creator>
				<category><![CDATA[Wordpress & Blogging]]></category>
		<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[custom post types]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[event listing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=81500</guid>
		<description><![CDATA[Last time we showed you how to create a simple events listing using perhaps the most powerful feature of WordPress 3.0 - custom post types. After some requests to develop this further, today we’ll be creating a product review database to tie together everything we've learnt so far. ]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/featured-wordpress.jpg" /><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/featured-wordpress.jpg?323f2c" alt="custom post types in wordpress"/>Last time I showed you how to <a title="How To Make Your Own Events Listing Using Custom Post Types [WordPress]" href="http://www.makeuseof.com/tag/events-listing-custom-post-types-wordpress/">create a simple events listing</a> using perhaps the most powerful feature of WordPress 3.0 &#8211; custom post types. After some requests to develop this further, today we’ll be creating a product review database to tie together everything we&#8217;ve learnt so far.</p>
<p>You’ll be able to maintain a separate list of products using custom post types, each with an associated image, as well as some meta-info such as price, rating, specifications &#8211; and we’ll finish it all off with a way to display them in a sidebar widget and an index page.Sounds good? Read on.</p>
<h2>Requirements:</h2>
<p>You’ll need a working WordPress 3.0+ self hosted install, and this will make use of extensive PHP coding. I’ll give you the code, but you’ll need to be relatively comfortable with PHP and XHTML to adjust variable names to your needs or change the style. If you need a quick beginners course on CSS and XHTML, may I suggest our wonderful free <a href="http://www.makeuseof.com/pages/download-learn-to-speak-internet-your-guide-to-xhtml">beginners guide</a> to download. I’d also suggest you use a <strong>cleanly coded</strong> but <strong>basic</strong> theme &#8211; the default <em>Twenty-Ten </em>or<em> Twenty-Eleven</em> theme is actually quite complicated to edit, so try this first on something simpler before trying to integrate with that.</p>
<h2><a href="http://www.makeuseof.com/tag/events-listing-custom-post-types-wordpress/">Create Post Types</a></h2>
<p>If you read last weeks tutorial, you should be somewhat familiar with creating a custom post type in WordPress. Copy and paste <a href="http://pastebin.com/bVLNagJT">this base code into a new plugin</a>, activate it, and begin adding some new products so we have a dataset to work with. (<em>Note: If you&#8217;d rather just download the complete and full code now without trying to add things along the way, <a href="http://pastebin.com/g1zYiZN5">use this finished code instead</a>. You can still follow along with the tutorial and customize it as we go</em>)</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/customposttype.png?323f2c" alt="custom post types in wordpress" width="170" height="111" /></p>
<p>It’s also wise to decide now what kind of meta-info you want to associate with each product. A database of digital cameras for instance might need:</p>
<ul>
<li>Retail Price</li>
<li>Resolution</li>
<li>HD Video</li>
<li>Purchase Link</li>
<li>Rating</li>
</ul>
<p>Rather than adding this info directly to the description of the product (the &#8216;post content&#8217;), we’re going to create custom fields to hold this info. On the add product screen, make sure you’ve enabled custom fields, then create a new field for each info set. You’ll only need to create new fields once &#8211; the next product you add you’ll be able to select the name of the custom field from the drop down box. Don’t forget to add a featured image, as well be using this to display alongside the info product later on.</p>
<h2>Single Product Template</h2>
<p>If you try to view one of your products now, you’ll probably get a <strong>404 &#8211; Not Found</strong> error. To fix that, head into the <strong>permalinks settings</strong> of WordPress and just hit <strong>Save Settings</strong> once. Now when you view one of your new product entries, depending on your theme, you might see something a little plain. The title and description text are there, but what about all our custom meta info and the image?</p>
<p>To customize the single product views, we’ll need to customize a new template file called <strong>single-products.php</strong> &#8211; do this by duplicating your existing <strong>single.php</strong> so we have the groundwork in place and aren’t starting from scratch.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/single-productsphp.jpg?323f2c" alt="custom post types" width="177" height="122" /></p>
<p>At this point, I’m going to make a very small change to the line that displays “<em>Written by (author) on (date)</em>”, so instead it just reads “<em>Added to the database on (date)</em>”. This is just so I can be sure template is working, and refreshing the single product page should show this change instantly.</p>
<p>Now, to add the featured post image we attached to the product, this one line should do it (I included style info too, in case you need it). I&#8217;ve posted the <a href="http://pastebin.com/5ZiKHFrg">full code to my own single-products.php here</a>, but remember it&#8217;s unique to my theme so simply copying that into your own theme directory may produce unexpected results.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/code-2-thumbnail.png?323f2c" alt="custom post types" width="510" height="35" /></p>
<p>The simplest way to add the meta info anywhere is to use:</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/code-3-meta.png?323f2c" alt="custom post types" width="199" height="37" /></p>
<p>&#8230;but this will only give us a very basic output list of key-value pairs. In order to do anything more complicated with the returned values (such as display a star-rating graphic), you need to grab all the values then iterate over them. [<a href="http://pastebin.com/PteVKCVc">View the code here</a>]:</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/code-4-custom-field-iteration.png?323f2c" alt="how to custom post types" width="500" height="331" /></p>
<p>In the example above, I’m checking each custom field name (the <strong>$key</strong>) to see if it’s called ‘<strong>Level</strong>’. If it <em>is</em> called level, instead of just echoing the value of the field back, I’m displaying a different graphical element based on the content. For any other custom fields, I’m echoing the value as it is, along with the name of the field (which is exactly what <strong>the_meta()</strong> does). Now my single product page looks like this:</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/single-product-view.jpg?323f2c" alt="how to custom post types" width="580" height="395" /></p>
<p>I’m going to leave it there for single product views, as it really depends upon your own theme and what you want to achieve with it. For now, let’s move onto a sidebar widget to display… the 3 highest ranked products in the database?</p>
<h2>Widget</h2>
<p>To do this, I’ve slightly adjusted the code I gave you before in the post <a href="http://www.makeuseof.com/tag/how-to-create-wordpress-widgets/">How to Write a Basic WordPress Widget</a>, but instead of showing a single random post, I’ve adjusted it with the following [<a href="http://pastebin.com/kNAgkekH">view the full code here</a>]:</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/code-5-widget.png?323f2c" alt="how to custom post types" width="580" height="169" /></p>
<p>This will give me 3 posts laid out similar to the example screenshot below. If you’re not seeing any of your products displayed, check very carefully the section that says &amp;meta_key=Rating to make sure you actually have a meta key of that name. Notice how I also chose to display the meta info associated with that product along with the featured thumbnail, but you can edit that particular code block to show whatever you like.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/widget.jpg?323f2c" alt="" width="300" height="300" /></p>
<h2>Product Archives or Listing</h2>
<p>Finally, I also wanted to make an index/archives page, so that visiting <strong>http://yourdomain.com/products/</strong> would show a simple list of all the products, similar to a blog index. The basic excerpt + post thumbnails style I showed you how to make in the <a title="How To Jazz Up Your WordPress By Adding Featured Images" href="http://www.makeuseof.com/tag/jazz-wordpress-blog-adding-featured-images/">How To Add Post Thumbnails To Your Theme</a> article was mostly sufficient, but in order to customize it I duplicated the <strong>archive.php</strong> file in my theme and renamed it <strong>archive-products.php</strong>.</p>
<p>If you don’t already have an archives page, just duplicate <strong>index.php</strong> and rename it to <strong>archive-products.php</strong>. Again, by adjusting the article meta-info line and adding a call to the <strong>the_meta()</strong> somewhere, I got this:</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/archives-and-widget.jpg?323f2c" alt="custom post types in wordpress" width="580" height="406" /></p>
<p>Obviously, it looks a bit silly with both the archives and sidebar, and it could do with a bit more style adjustment, but I’ll leave that up to you!</p>
<p>That’s it from me today. You can view the <a href="http://pastebin.com/g1zYiZN5">complete full code online here</a> &#8211; just copy and paste or download the entire thing into a file called <strong>products.php</strong>, and place it in your plugins directory. You should be able to potentially expand your WordPress blog into a database of anything now! It’s difficult to answer individual problems you might be having, but do please post in the comments if you&#8217;d like some help or would like to show your appreciation &#8211; a tweet or Facebook like would very much be appreciated, or even a mention on your blog if you decide to implement this. Thanks for reading, and don&#8217;t forget all the other <a href="http://www.makeuseof.com/service/developers/">WordPress tutorials</a> we have!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/product-review-database-wordpress-custom-post-types-custom-fields-featured-images-widgets/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How To Pull &amp; Publish User Information For An Author Bio Section [WordPress]</title>
		<link>http://www.makeuseof.com/tag/pull-publish-user-information-wordpress/</link>
		<comments>http://www.makeuseof.com/tag/pull-publish-user-information-wordpress/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 21:31:24 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Wordpress & Blogging]]></category>
		<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webmaster tools]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=80749</guid>
		<description><![CDATA[You know, there really is a lot to be said for Wordpress. While it's true that most people will simply install a theme and only customize the Wordpress site to the extent allowed by the control panel, the truth is that with just a little bit of study and practice, you can easily tweak the PHP files to customize it for your needs.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/writerpass.png"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/writerpass.png?323f2c" alt="wordpress author info" />You know, there really is a lot to be said for WordPress. Not only is PHP &#8211; the language WordPress is based on &#8211; very versatile and easy to learn, but WordPress comes with so many built-in functions that you can really customize an amazing site.</p>
<p>For those of you who have followed my past articles, you will know that I cover WordPress fairly often. In fact, there are a few of us here at MUO that regularly lift the hood to do some tweaking. Aibek covered <a href="http://www.makeuseof.com/tag/4-free-tools-for-fool-proof-wordpress-backup/">WordPress backups</a> a few years ago, and James has produced a lot of <a href="http://www.makeuseof.com/service/developers">WordPress tutorials</a> lately.</p>
<p>While it&#8217;s true that most people will simply install a theme and only customize the WordPress site to the extent allowed by the control panel, the truth is that with just a little bit of study and practice, you can easily tweak the PHP files within any WordPress template to customize it for your needs.</p>
<h2>Customizing Your WordPress Site With User Information</h2>
<p>The closest thing I&#8217;ve come to this is when I wrote about how to add a <a href="http://www.makeuseof.com/tag/add-automatic-footer-wordpress-posts/">dynamic author footer</a> to your WordPress blog posts. In my opinion, that is really a feature that every blog should have &#8211; it provides for a much more professional appearance, and it offers more credibility to the reader.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/footer.png?323f2c" alt="wordpress author info" width="381" height="306" /></p>
<p style="text-align: left;">If you read that article, you&#8217;ll see that I used several built-in functions that are part of WordPress, including one that obtains the name, email address, number of posts, profile picture and author description from the profile page. You can take all of that data and then string it together into text that dynamically gets published depending on what article is currently on the page and who the author is.</p>
<p style="text-align: left;">I was really excited when I discovered how to do that, but more recently I came across a situation where the method above didn&#8217;t work &#8211; a central page, like the website main blog page, where there is no single &#8220;author&#8221; for the page. In that case, the method above won&#8217;t work. If you use the functions I listed in that article, it will always pull the default author.</p>
<p style="text-align: left;">This makes it really hard when you want to build an box of author bios for all of the writers on your site. I also noticed that there are very few blogs out there that have published how to do this &#8211; everyone is writing about the standard &#8220;the_author()&#8221; functions that look at the author for the current page.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/edituser1.png?323f2c" alt="wordpress author bio" width="507" height="389" /></p>
<p>Before you get started using the functions that I&#8217;m going to introduce you to, first go to your &#8220;<em>Edit User</em>&#8221; page in WordPress, and for each of your users, you&#8217;ll need to know the email address they&#8217;ve signed up with, as well as the User_ID. You can see this when you go to edit their profile, as it&#8217;s listed in the URL next to &#8220;<em>user_id=</em>&#8220;.</p>
<p style="text-align: left;">Once you have those two pieces of information from the user profile, you&#8217;re ready to get started with the &#8220;<em>get_userdata</em>&#8221; function. Here is a simple script that will extract both the avatar photo and the user_description from the WordPress user profile.</p>
<pre>&lt;span style="float:left;margin:0 10px 0 0;"&gt;
&lt;?php $author_email = "freewritingcenter@gmail.com";
echo get_avatar($author_email, '80')?&gt;&lt;/span&gt;
&lt;?php $user_info = get_userdata(4);
echo $user_info-&gt;user_description . "\n";
?&gt;</pre>
<p style="text-align: left;">How does this work? It&#8217;s pretty simple. The &#8220;<em>get_avatar</em>&#8221; is not dependent upon the current author of the page, it only cares about the e-mail address to obtain the avatar. But to get the description text, you have no choice but to use &#8220;<em>get_userdata()</em>&#8221; to pull that information. The only parameter you have to send it is the &#8220;<em>user_id</em>&#8221; that you just wrote down. Here&#8217;s how it looks:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/ryanbio.png?323f2c" alt="wordpress author bio" width="323" height="79" /></p>
<p style="text-align: left;">The secret here is that the &#8220;<em>get_userdata()</em>&#8221; function actually pulls a whole list of parameters that you can obtain. Above, I only did an &#8220;echo&#8221; of the user_description text from the user profile, but you could also have the script print out the user&#8217;s name, email address, their URL/blog, and even an array of what their WordPress editing permissions are.</p>
<p>The coolest thing about using this function rather than the &#8220;<em>the_author()</em>&#8221; set of functions is that with just the User ID, you can extract information about any single one of your registered users, regardless who authored the page where your script is running. This is ideal for a list of author bios for a website. For example, I placed all of the bios in the sidebar on my site and formatted it all to pull the author descriptions one after the other.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-80754" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/authorbios.png?323f2c" alt="wordpress author info" width="493" height="417" /></p>
<p>The beauty of this solution is that if you need to make any changes to the WordPress author bios, you don&#8217;t have to edit any of the pages. Just go to the profile page and edit the bio there, all content will instantly reflect those changes.</p>
<p>Do you have a WordPress site with multiple writers? Can you think of other creative ways to integrate user information into web page content? Share your own experiences and insight in the comments section below.</p>
<p><small>Image credit: <a rel="nofollow" href="http://www.sxc.hu/photo/478187">Henk L</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/pull-publish-user-information-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Install PHPList To Host Your Own Subscriber System</title>
		<link>http://www.makeuseof.com/tag/install-phplist-host-subscriber-system/</link>
		<comments>http://www.makeuseof.com/tag/install-phplist-host-subscriber-system/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 21:31:59 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[How-To Articles]]></category>
		<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[blogging tools]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[newsletter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[self-hosted]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=79296</guid>
		<description><![CDATA[There are a lot of blogs and websites on the Internet that have a subscription list, where you can sign up to receive a newsletter. Maybe you've even considered offering such a subscriber system on your own website, but it seems far too expensive and much too complicated to install on your own server. Enter PHPList, a free solution.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/subscribers.png"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/subscribers.png?323f2c" alt="host mailing list" />There are a lot of blogs and websites on the Internet that have a subscription list, where you can sign up to receive a newsletter. Maybe you&#8217;ve even considered offering such a subscriber system on your own website, but it seems far too expensive and much too complicated to install on your own server.</p>
<p>Here at MUO, we&#8217;ve covered a lot about creating a mailing list and a newsletter. James described a useful online service <a href="http://www.makeuseof.com/tag/assemble-a-no-fuss-mailing-list-using-zotero-gmail/">called Zotero</a> for using a mailing list. Steve offered <a href="http://www.makeuseof.com/tag/2-dead-simple-ways-start-email-newsletter/">two great online services</a> that you could use to distribute a newsletter. However, In all of these cases, you are dependent upon another online service &#8211; most of which are <em>not</em> usually free.</p>
<p>Enter PHPList. You&#8217;ve heard of PHPList <a href="http://www.makeuseof.com/dir/phplist-hosted-open-source-email-list-manager-software/">on Directory</a> &#8211; at least the hosted option anyway. Once again, this is an online service that you pay for, where you can set up a mailing list on your website. Someone else hosts the service and the list, and you have to pay a monthly fee. But you can actually download PHPList for <em>absolutely free</em> and install it on your own web server. The folks at PHPList will charge hundreds to install and configure the service for you, but in all honesty if you&#8217;ve ever installed WordPress or other PHP apps on your server before, this one isn&#8217;t a whole lot different. You <em>can</em> do it yourself.</p>
<h2>Installing PHPList On Your Own Web Server</h2>
<p>What&#8217;s the benefit of installing the script on your own server? Well, number one, your entire list and everything associated with the subscriptions and newsletter are stored somewhere that <em>you</em> control. It&#8217;s also free.</p>
<p>First, download a free copy of <a href="http://www.phplist.com/">PHPList</a>, and save it to your PC.  Just as when you install WordPress, using phpMyAdmin, or whatever utility your web host uses to create a new SQL Database, add a new database called &#8220;<em>phplistdb</em>&#8221; and then add a new user &#8220;<em>phplist</em>&#8221; with password &#8220;<em>phplist</em>&#8220;, and grant all rights to the phplistdb database.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist1.png?323f2c" alt="host mailing list" width="577" height="397" /></p>
<p>In the downloaded Zip file, you&#8217;ll find a &#8220;<em>public_html</em>&#8221; folder with an index.html file and a &#8220;<em>lists</em>&#8221; folder. Upload these to the sub-directory on your web server (in the public folder) where you want to store your PHPLists script.  Before you upload, go in and make sure to edit the <em>config.php</em> file in<em> /lists/config/.</em></p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplistb.png?323f2c" alt="host mailing php" width="576" height="373" /></p>
<p>The important settings are toward the top of the config.php file. Just make sure that the database name, user ID and password are the same as the ones you used when you set up the database. Another important setting is $pageroot and $adminpages &#8211; make sure those point to the correct directory where you uploaded the &#8220;lists&#8221; directory.</p>
<p>If you&#8217;ve set up the database and the config file correctly, when you open up &#8220;<em>http://&lt;your-domain&gt;/subscriptions/lists/</em>&#8221; , the script will open up the page where you can run the PHPlist install script. I&#8217;ve used &#8220;subscriptions&#8221; in this case, but you&#8217;ll use whatever sub-directory where you uploaded the script.</p>
<p>Click to install PHPList, and you&#8217;ll see the script populate all of the tables in the PHPlist database you created.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist2.png?323f2c" alt="host mailing php" width="577" height="416" /></p>
<p>Once that&#8217;s done, click on &#8220;<em>main page</em>&#8220;, and then click on &#8220;<em>Setup phpList</em>&#8221; on the next screen.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist3.png?323f2c" alt="host mailing php" width="467" height="340" /></p>
<p>This next screen makes it ridiculously easy to set up phpList to run on your server. All you have to do is go through each item on the list. The procedure walks you through everything.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist4.png?323f2c" alt="host mailing list free" width="475" height="337" /></p>
<p>On the page configuration pages, you can customize just about everything that the users see during the subscription process.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist5.png?323f2c" alt="host mailing list free" width="484" height="359" /></p>
<p>Customizations include the general formatting of the &#8220;subscribe me&#8221; page, as well  as where people are forwarded after successfully subscribing &#8211; allowing  you to offer a &#8220;thank you for subscribing&#8221; page that you&#8217;ve built  yourself.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist6.png?323f2c" alt="host mailing list free" width="493" height="373" /></p>
<p>As you can see above, nothing is set in stone. Want the header of the subscription page to look just like your own site, go ahead and edit the &#8220;header&#8221; code to your liking.</p>
<p>Keep in mind that you don&#8217;t have to do all of this customization. You can install, set up and run phpList right out of the box without any customization.  All you have to do is create a &#8220;subscribe&#8221; link on your site, and send visitors to the /lists/ directory &#8211; they&#8217;ll see the sign-up page where they can enter in their email address to subscribe to your newsletter.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/phplist7.png?323f2c" alt="host mailing list" width="394" height="255" /></p>
<p>All information gets stored on <em>your</em> server, not some service where everything gets stored out on the &#8220;cloud&#8221; somewhere. They subscribe and get forwarded directly to the &#8220;thank you&#8221; page.</p>
<p>There is one caveat to keep in mind &#8211; the script needs the ability to send email on your server. It can use SMTP if you configure it in the config file, but it can take some work to get it to send if you don&#8217;t use the standard port 25. There are lots of help forums out there that can help with this setup, but just keep it in mind if you hit a brick wall. You may also need to work closely with your web host service so that your account has the appropriate permissions to send out mail. Or you can set up the system on your own web server and open up the right port yourself.</p>
<p>So, give phpList a try and see what it&#8217;s like to control your own subscriber list. You&#8217;ll never have to worry about losing the list that you worked so hard to build &#8211; you can export and save that list so that you&#8217;ll always have it. Let us know what you think of the service, and whether you know of any similar newsletter scripts that work as well on a web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/install-phplist-host-subscriber-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Build A Basic Web Crawler To Pull Information From A Website (Part 2)</title>
		<link>http://www.makeuseof.com/tag/build-webcrawler-part-2/</link>
		<comments>http://www.makeuseof.com/tag/build-webcrawler-part-2/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 17:31:22 +0000</pubDate>
		<dc:creator>James Bruce</dc:creator>
				<category><![CDATA[How-To Articles]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=60554</guid>
		<description><![CDATA[This is part 2 in a series I started last time about how to build a web crawler in PHP. Previously I introduced the Simple HTML DOM helper file, as well as showing you how incredibly simple it was to grab all the links from a webpage, a common task for search engines like Google. [...]]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/12/code.jpg"><img class="align-left" style="border: 0px none; margin-left: 20px; margin-top: 5px; float: right;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/12/code.jpg?323f2c" alt="build a webcrawler" width="300" />This is part 2 in a series I started last time about how to build a web crawler in PHP. Previously I introduced the Simple HTML DOM helper file, as well as showing you how incredibly simple it was to grab all the links from a webpage, a common task for search engines like Google.</p>
<p>If you read <a href="http://www.makeuseof.com/tag/build-basic-web-crawler-pull-information-website/">part 1 and followed along</a>, you&#8217;ll know I set some homework to adjust the script to grab images instead of links.</p>
<p><span id="more-60554"></span><br />
I dropped some pretty big hints, but if you didn&#8217;t get it or if you couldn&#8217;t get your code to run right, then here is the solution. I added an additional line to output the actual images themselves as well, rather than just the source address of the image.</p>
<div style="border: 1px solid; margin: 10px 0px; padding: 15px 10px 15px 50px; color: #00529b; background-color: #bde5f8; font-family: courier,lucida console,monospace;">
<pre>&lt;?php
include_once('simple_html_dom.php');
$target_url = "http://www.tokyobit.com";
$html = new simple_html_dom();
$html-&gt;load_file($target_url);
foreach($html-&gt;find('img') as $img)
{
echo $img-&gt;src."&lt;br /&gt;";
echo $img."&lt;br/&gt;";
}
?&gt;</pre>
</div>
<p>This should output something like this:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/12/homework-output.png?323f2c" alt="build a webcrawler" width="580" height="332" /></p>
<p>Of course, the results are far from elegant, but it does work. Notice that the script is only capable of grabbing images that are on the content of the page in the form of &lt;img&gt; tags &#8211; a lot of the page design elements are hard-coded into the CSS, so our script can&#8217;t grab those. Again, you can run this through my server and if you wish <a href="http://www.tokyobit.com/tutorial/homework.php">at this URL</a>, but to enter your own target site you&#8217;ll have to edit the code and run on your own server as I explained in part 1. At this point, you should bear in mind that downloading images from a website is significantly more stress on the server than simply grabbing text links, so do only try the script on your own blog or mine and try not to refresh lots of times.</p>
<p>Let&#8217;s move on and be a little more adventurous. We&#8217;re going to build upon our original file, and instead of just grabbing all the links randomly, we&#8217;re going to make it do something more useful by getting the post content instead. We can do this quite easily because standard WordPress wraps the post content within a &lt;div class=&#8221;post&#8221;&gt; tag, so all we need to do is grab any &#8220;div&#8221; with that class type, and output them &#8211; effectively stripping everything except the main content out of the original site. Here is our initial code:</p>
<div style="border: 1px solid; margin: 10px 0px; padding: 15px 10px 15px 50px; color: #00529b; background-color: #bde5f8; font-family: courier,lucida console,monospace;">
<pre>&lt;?php
include_once('simple_html_dom.php');
$target_url = "http://www.tokyobit.com";</pre>
<p>$html = new simple_html_dom();</p>
<p>$html-&gt;load_file($target_url);<br />
foreach($html-&gt;find(&#8216;div[class=post]&#8216;) as $post)<br />
{<br />
echo $post.&#8221;&lt;br /&gt;&#8221;;<br />
}</p>
<p>?&gt;</p>
</div>
<p>You can see the output by <a href="http://www.tokyobit.com/tutorial/example3.php" target="_blank">running the script from here</a> (forgive the slowness, my site is hosted at GoDaddy and they don&#8217;t scale very well at all), but it doesn&#8217;t contain any of the original design &#8211; it is literally just the content.</p>
<p>Let me show you another cool feature now &#8211; the ability to delete elements of the page that we don&#8217;t like. For instance, I find the meta data quite annoying &#8211; like the date and author name &#8211; so I&#8217;ve added some more code that finds those bits (identified by various classes of div such as post-date, post-info, and meta). I&#8217;ve also added a simple CSS style-sheet to format the output a little. Daniel covered a <a href="http://www.makeuseof.com/tag/top-5-sites-to-learn-some-css-programming/">number of great places to learn CSS online</a> if you&#8217;re not familiar with it.</p>
<p>As I mentioned in part 1, even though the file contains PHP code, we can still add standard HTML or CSS to the page and the browser will understand it just fine &#8211; the PHP code is run on the server, then everything is sent to the browser, to you, as standard HTML. Anyway, here&#8217;s the whole final code:</p>
<pre>
</pre>
<div style="border: 1px solid; margin: 10px 0px; padding: 15px 10px 15px 50px; color: #00529b; background-color: #bde5f8; font-family: courier,lucida console,monospace;">&lt;head&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
div.post{background-color: gray;border-radius: 10px;-moz-border-radius: 10px;padding:20px;}<br />
img{float:left;border:0px;padding-right: 10px;padding-bottom: 10px;}<br />
body{width:60%;font-family: verdana,tahamo,sans-serif;margin-left:20%;}<br />
a{text-decoration:none;color:lime;}<br />
&lt;/style&gt;<br />
&lt;/head&gt;</p>
<p>&lt;?php<br />
include_once(&#8216;simple_html_dom.php&#8217;);</p>
<p>$target_url = &#8220;http://www.tokyobit.com&#8221;;</p>
<p>$html = new simple_html_dom();</p>
<p>$html-&gt;load_file($target_url);<br />
foreach($html-&gt;find(&#8216;div[class=post]&#8216;) as $post)<br />
{<br />
$post-&gt;find(&#8216;div[class=post-date]&#8216;,0)-&gt;outertext = &#8221;;<br />
$post-&gt;find(&#8216;div[class=post-info]&#8216;,0)-&gt;outertext = &#8221;;<br />
$post-&gt;find(&#8216;div[class=meta]&#8216;,0)-&gt;outertext = &#8221;;<br />
echo $post.&#8221;&lt;br /&gt;&#8221;;<br />
}</p>
<p>?&gt;</p>
</div>
<p>You can <a href="http://www.tokyobit.com/tutorial/example4.php" target="_blank">check out the results here</a>. Pretty impressive, huh? We&#8217;ve taken the content of the original page, got rid of a few bits we didn&#8217;t want, and completely reformatted it in the style we like! And more than that, the process is now automated, so if new content were to be published, it would automatically display on our script.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/12/example4.png?323f2c" alt="build a webcrawler" width="580" height="530" /></p>
<p>That&#8217;s only a fraction of the power available to you though, you can <a href="http://simplehtmldom.sourceforge.net/manual.htm">read the full manual online here</a> if you&#8217;d like to explore it a little more of the PHP Simple DOM helper and how it greatly aids and simplifies the web crawling process. It&#8217;s a great way to take your knowledge of basic HTML and take it up to the next dynamic level.</p>
<p>What could you use this for though? Well, let&#8217;s say you own lots of websites and wanted to gather all the contents onto a single site. You could copy and paste the contents every time you update each site, or you could just do it all automatically with this script. Personally, even though I may never use it, I found the script to be a useful exercise in understanding the underlying structure of modern internet documents. It also exposes how simple it is to re-use content when everything is published on a similar system using the same semantics.</p>
<p>What do you think? Again, do let me know in the comments if you&#8217;d like to learn some more basic web programming, as I feel like I&#8217;ve started you off on level 5 and skipped the first 4! Did you follow along and try yourself, or did you find it a little too confusing? Would you like to learn more about some of the other technologies behind the modern internet browsing experience?</p>
<p>If you&#8217;d prefer learning to program on the desktop side of things, Bakari covered some great beginner resources for <a href="http://www.makeuseof.com/tag/some-introductory-resources-for-learning-mac-programming/">learning Cocoa Mac OSX desktop programming</a> at the start of the year, and our <a href="http://www.makeuseof.com/dir/codefetch-code-searching-tool/">featured directory app CodeFetch</a> is useful for any programming language. Remember, skills you develop programming in any language can be used across the board.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/build-webcrawler-part-2/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>How To Build A Basic Web Crawler To Pull Information From A Website (Part 1)</title>
		<link>http://www.makeuseof.com/tag/build-basic-web-crawler-pull-information-website/</link>
		<comments>http://www.makeuseof.com/tag/build-basic-web-crawler-pull-information-website/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 17:31:47 +0000</pubDate>
		<dc:creator>James Bruce</dc:creator>
				<category><![CDATA[How-To Articles]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webmaster tools]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=59666</guid>
		<description><![CDATA[Web Crawlers, sometimes called scrapers, automatically scan the Internet attempting to glean context and meaning of the content they find. The web wouldn&#8217;t function without them. Crawlers are the backbone of search engines which, combined with clever algorithms, work out the relevance of your page to a given keyword set. The Google web crawler will enter [...]]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/11/web-crawler.gif"><img class="align-left" style="border: 0px none; margin-left: 20px; margin-top: 5px; float: right;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/11/web-crawler.gif?323f2c" alt="web crawler" width="300" height="264" />Web Crawlers, sometimes called scrapers, automatically scan the Internet attempting to glean context and meaning of the content they find. The web wouldn&#8217;t function without them. Crawlers are the backbone of search engines which, combined with clever algorithms, work out the relevance of your page to a given keyword set.</p>
<p>The Google web crawler will enter your domain and scan every page of your website, extracting page titles, descriptions, keywords, and links  &#8211; then report back to Google HQ and add the information to their huge database.</p>
<p>Today, I&#8217;d like to teach you how to make your own basic crawler &#8211; not one that scans the whole Internet, though, but one that is able to extract all the links from a given webpage.</p>
<p><span id="more-59666"></span><br />
Generally, you should make sure you have permission before scraping random websites, as most people consider it to be a very grey legal area. Still, as I say, the web wouldn&#8217;t function without these kind of crawlers, so it&#8217;s important you understand how they work and how easy they are to make.</p>
<p>To make a simple crawler, we&#8217;ll be using the most common programming language of the internet &#8211; PHP. Don&#8217;t worry if you&#8217;ve never programmed in PHP &#8211; I&#8217;ll be taking you through each step and explaining what each part does. I am going to assume an absolute basic knowledge of HTML though, enough that you understand how a link or image is added to an HTML document.</p>
<p>Before we start, you will need a server to run PHP. You have a number of options here:</p>
<ul>
<li> If you host your own blog using WordPress, you already have one, so upload the files you write via FTP and run them from there. Matt showed us <a href="http://www.makeuseof.com/tag/free-ftp-clients-windows/">some free FTP clients for Windows</a> you could use.</li>
<li>If you don&#8217;t have a web server but do have an old PC sitting around, then you could follow Dave&#8217;s tutorial here <a href="http://www.makeuseof.com/tag/build-linux-web-server-computer-part-1/">to turn an old PC into a web server</a>.</li>
<li>Just one computer? Don&#8217;t worry &#8211; Jeffry showed us how we can <a href="http://www.makeuseof.com/tag/building-your-own-local-wordpress-blog/">run a local server inside of Windows or Mac</a>.</li>
</ul>
<h2>Getting Started</h2>
<p>We&#8217;ll be using a helper class called <a href="http://simplehtmldom.sourceforge.net/">Simple HTML DOM</a>. Download <a href="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/12/my-first-crawler.zip?323f2c">this zip file</a>, unzip it, and upload the <em>simple_html_dom.php</em> file contained within to your website first (in the same directory you&#8217;ll be running your programs from). It contains functions we will be using to traverse the elements of a webpage more easily. That zip file also contains today&#8217;s example code.</p>
<p>First, let&#8217;s write a simple program that will check if PHP is working or not. We&#8217;ll also import the helper file we&#8217;ll be using later. Make a new file in your web directory, and call it <em>example1.php</em> &#8211; the actual name isn&#8217;t important, but the <em>.php</em> ending is. Copy and paste this code into it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'simple_html_dom.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">phpinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Access the file through your internet browser. If you don&#8217;t have a server set up, you can still <a href="http://www.tokyobit.com/tutorial1.php">run the program from my server if you want</a>. If everything has gone right, you should see a big page of random debug and server information printed out like below &#8211; all from the little line of code! It&#8217;s not really what we&#8217;re after, but at least we know everything is working.</p>
<p><img class="alignnone size-full wp-image-60155" title="phpinfo" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/11/phpinfo.png?323f2c" alt="web crawler" width="580" height="414" /></p>
<p>The first and last lines simply tell the server we are going to be using PHP code. This is important because we can actually include standard HTML on the page too, and it will render just fine. The second line pulls in the Simple HTML DOM helper we will be using. The <em>phpinfo();</em> line is the one that printed out all that debug info, but you can go ahead and delete that now. Notice that in PHP, any commands we have must be finished with a colon (<strong>;</strong>). The most common mistake of any PHP beginner is to forget that little bit of punctuation.</p>
<p>One typical task that Google performs is to pull all the links from a page and see which sites they are endorsing. Try the following code next, in a new file if you like.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'simple_html_dom.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>$target_url = &#8220;http://www.tokyobit.com/&#8221;;<br />
$html = new simple_html_dom();<br />
$html-&gt;load_file($target_url);<br />
foreach($html-&gt;find(&#8216;a&#8217;) as $link){<br />
echo $link-&gt;href.&#8221;&lt;br /&gt;&#8221;;<br />
}<br />
?&gt;</p>
</pre>
<p>Again, you can <a href="http://www.tokyobit.com/tutorial/example2.php">run that from my server</a> too if you don't have your own set up. You should get a page full of URLs! Wonderful. Most of them will be internal links, of course. In a real world  situation, Google would ignore internal links and simply look at what  other websites you're linking to, but that's outside the scope of this  tutorial.</p>
<p>If you're running on your own server, go ahead and change the <em>target_URL</em> variable to your own webpage or any other website you'd like to examine.</p>
<p>That code was quite a jump from the last example, so let's go through in pseudo-code to make sure you understand what's going on.</p>
<div style="border: 1px solid; margin: 10px 0px; padding: 15px 10px 15px 50px; color: #00529b; background-color: #bde5f8; font-family: courier,lucida console,monospace;">
<p>Include once the simple HTML DOM helper file.</p>
<p>Set the target URL as http://www.tokyobit.com.</p>
<p>Create a new simple HTML DOM object to store the target page</p>
<p>Load our target URL into that object</p>
<p>For each link &lt;a&gt; that we find on the target page</p>
<p>- Print out the HREF attribute</p>
</div>
<p>That's it for today, but if you'd like a bit of challenge - try to modify to the second example so that instead of searching for links (<strong>&lt;a&gt;</strong> elements), it grabs images instead (<strong>&lt;img&gt;</strong>). Remember, the <strong>src</strong> attribute of an image specifies the URL for that image, not <strong>HREF</strong>.</p>
<p>Would you like learn more? Let me know in the comments if you're interested in reading a part 2 (complete with homework solution!), or even if you'd like a back-basics PHP tutorial - and I'll rustle one up next time for you. I warn you though - once you get started with programming in PHP, you'll start making plans to create the next Facebook, and all those latent desires for world domination will soon consume you. <em>Programming is fun</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/build-basic-web-crawler-pull-information-website/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>How To Add An Automatic Author Footer To WordPress Posts</title>
		<link>http://www.makeuseof.com/tag/add-automatic-footer-wordpress-posts/</link>
		<comments>http://www.makeuseof.com/tag/add-automatic-footer-wordpress-posts/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 18:31:37 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Web Apps & Internet]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=52713</guid>
		<description><![CDATA[Having your own blog sounds so simple, doesn&#8217;t it? Install WordPress on your hosting account, load up a cool theme, and then you&#8217;re golden right? Well, not exactly. Your WordPress profile doesn&#8217;t display a cool picture, so you&#8217;ve got to sign up for a Gravatar account. Your post doesn&#8217;t display comments where you want them [...]]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/08/phpcode.jpg"><img class="align-left" style="border: 0px none; margin-left: 20px; margin-top: 5px; float: right;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/08/phpcode.jpg?323f2c" alt="change footer credit on wordpress" width="300" height="224" />Having your own blog sounds so simple, doesn&#8217;t it? Install WordPress on your hosting account, load up a cool theme, and then you&#8217;re golden right? Well, not exactly.</p>
<p>Your WordPress profile doesn&#8217;t display a cool picture, so you&#8217;ve got to sign up for a <a href="http://www.makeuseof.com/tag/get-a-pic-next-to-your-comments-on-makeuseof-other-blogs/">Gravatar</a> account. Your post doesn&#8217;t display comments where you want them to on each post, so the next thing you know you find yourself trying to tweak the PHP code to get things just right.</p>
<p><span id="more-52713"></span><br />
I&#8217;ve been in the &#8220;need-to-customize&#8221; boat enough times to know that it&#8217;s nice to have a carefully laid out set of instructions that will accomplish a specific task on your blog. In this case, I&#8217;m going to lay out how you can create a very convenient and dynamic biography footer at the end of every post, depending on which user wrote the blog entry.</p>
<p>This &#8220;tweak&#8221; will basically pull the bio information entered into the user profile screen in the admin panel, and it will publish the Gravatar photo associated with the email of that user using the bio info to change the footer credit on WordPress.</p>
<h2>Understanding The PHP Tags</h2>
<p>You only have to edit one PHP file in your theme to accomplish this. That is the <em>single.php</em> file. This file handles the display of individual posts. You&#8217;re going to insert dynamic PHP tags to create a footer in every post. The PHP functions that you&#8217;re going to use are as follows.</p>
<ul>
<li><strong>get_the_author_email() </strong>- This pulls the email address from the current user&#8217;s profile page.</li>
<li><strong>the_author_description() </strong>- This pulls the description text from the profile page.</li>
<li><strong>the_author()</strong> &#8211; This will extract the user&#8217;s name.</li>
<li><strong>the_user_posts()</strong> &#8211; This provides an accumulated total of posts the user has written.</li>
</ul>
<p>All of this information is entered into the profile page by the users that you have writing on your blog.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-52717" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/08/biopage.jpg?323f2c" alt="change footer credit on wordpress" width="577" height="502" /></p>
<p>So long as your users use the same email in the &#8220;E-mail&#8221; field as they&#8217;ve used on their Gravatar account, their profile picture will load correctly into this WordPress blog. The author name comes from the &#8220;Nickname field&#8221;, and the description comes from the &#8220;Biographical Info&#8221; field. So long as these fields are filled out, your footer bio in each post will work perfectly.</p>
<h2>Writing The Code</h2>
<p>Even if you&#8217;ve never edited a line of PHP code in your life, you can do this. Go into your hosting account and browse the PHP files in your theme directory until you find <em>single.php</em>. It should be in <em>WP-content/themes</em>, and then the directory of your theme. Open up <em>single.php</em>, and search for &#8220;<em>php the_content</em>&#8220;. It should look like the code below.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-52720" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/08/editing2.jpg?323f2c" alt="change wordpress footer" width="574" height="310" /></p>
<p>Go to the end of that line, and press enter so that you&#8217;ll be entering the following code directly after that line. This will ensure that your footer information is always printed <em>directly</em> after the content of your post. It really is that simple.</p>
<p>Next, what you&#8217;re going to do is create the bio footer one element at a time, starting with the avatar picture and ending with the number of posts.  Just copy and paste the following code and you are all set.</p>
<blockquote><p><em>&lt;?php $author_email = get_the_author_email () ;<br />
echo  get_avatar ($author_email,  &#8217;80&#8242;) ;   ?&gt;&lt;/span&gt;<br />
&lt;br&gt;&lt;p&gt;&lt;i&gt;&lt;?php the_author_description () ;   ?&gt;<br />
&lt;?php the_author() ;  ?&gt; has  &lt;?php the_author_posts () ;   ?&gt;<br />
post(s) at NAME OF WEBSITE&lt;/i&gt;&lt;/p&gt;</em><br />
&lt;div style=&#8221;clear:both;&#8221;&gt;&lt;/div&gt;</p></blockquote>
<p>I like to have a line to divide the content from the bio, so I inserted &#8220;*****&#8221; with a line break. If you follow the code from top to bottom, you can see exactly how the bio footer is created. First, the email address is pulled from the user profile, then it&#8217;s used to obtain the bio photo from the gravatar image. Next, the description is pulled from the profile and printed, followed by the number of posts.</p>
<p>You can also add any formatting (bold or italics) and any additional text that you like. Here&#8217;s the footer after I&#8217;ve published a post.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-52730" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/08/biofooter.jpg?323f2c" alt="change footer credit on wordpress" width="502" height="174" /></p>
<p style="text-align: left;">The arrows point to the elements represented by variables &#8211; the photo, description, number of posts and the name. Using these variables, you can make the footer bio look however you like, and the information gets pulled from the appropriate profile and automatically filled in based on which user created the post.</p>
<p style="text-align: left;">It&#8217;s fully automated and works on just about any WordPress blog running any theme. Go ahead and give it a shot (just remember to save your original single.php file in case of any errors) and let us know how it went! Do you know of any other ways to list bio information in the post footer?  If so, let us know in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/add-automatic-footer-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Allow a Visitor to Send a File via Email HTML Form with PHPMailer</title>
		<link>http://www.makeuseof.com/tag/visitor-send-file-email-html-form-phpmailer/</link>
		<comments>http://www.makeuseof.com/tag/visitor-send-file-email-html-form-phpmailer/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 23:31:34 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Cool Software Apps]]></category>
		<category><![CDATA[email tips]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=41277</guid>
		<description><![CDATA[While the Internet has evolved into a community where most of us converse and exchange ideas on articles we read within comment areas, forums and through email, there are also other cases where feedback is needed, and those methods aren&#8217;t good enough. Sometimes a webmaster simply needs to provide the ability for a website visitor [...]]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/attached.jpg" /><img class="align-left" style="margin-right: 20px;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/attached.jpg?323f2c" alt="" vspace="5" align="left" />While the Internet has evolved into a community where most of us converse and exchange ideas on articles we read within comment areas, forums and through email, there are also other cases where feedback is needed, and those methods aren&#8217;t good enough. Sometimes a webmaster simply needs to provide the ability for a website visitor to send a file via email. If you think about it, providing a comment area or &#8220;guestbook&#8221; is simple these days.</p>
<p>If you just need to get feedback through text fields, or to record a visit &#8211; take a look at <a href="http://www.makeuseof.com/tag/top-5-free-ways-guestbook-website/">Abhigyan&#8217;s article</a> on different ways to get a guestbook on your site. If you just need a form with text fields so your visitors can provide feedback or send in requests and comments, take a look at the <a href="http://www.makeuseof.com/tag/3-free-contact-form-generators-to-get-feedback-from-your-visitors/">article I wrote</a> on free contact form generators that should do the trick.</p>
<p><span id="more-41277"></span><br />
However, if you need the added functionality of a &#8220;file&#8221; field where your visitors can attach a file &#8211; then you&#8217;re going to need to pull out a different bag of tricks. In this article I&#8217;m going to explain which approach to doing this that I feel is the most secure, and then I&#8217;m going to show you how to use a very cool free tool on your website which lets you embed this feature on your own website.</p>
<h3><strong>Methods To Send A File Via Email HTML Form</strong></h3>
<p>There are plenty of reasons why you may need your website visitors to send you a file. Maybe you&#8217;re accepting job applications and resumes. Maybe you are a publisher and want to provide a fast way for authors to submit their short stories. Regardless of the reason, instantly transmitting files is both a convenience and a security hazard, so it has to be handled the right way.</p>
<p>There is an element of the FORM tag that lets you upload a file to your server through the POST method. You will need a script (ACTION) to process it and store it in a directory on your server. <a href="http://www.w3schools.com/php/php_file_upload.asp">W3Schools</a> provides a really useful example of how to do this using PHP, which I thought was well laid out and easy enough to follow if this approach suits you.</p>
<p>However, while I&#8217;ve always preferred PHP over other scripts, I don&#8217;t really feel safe letting my visitors upload a file to my server. There are ways that you can make the process more secure and block spammers, but I still get a bit uneasy about the potential for viruses or other nasty files. For this reason, I really prefer having the form submission get packaged up in an email and sent off to me.</p>
<p>My email system has an excellent virus scanner for file attachments, so I know I can carefully handle files using this approach. This is why I turned to the free solution called <a href="http://phpmailer.worxware.com/index.php?pg=phpmailerfe">PHPMailer-FE</a>. This is one product that&#8217;s part of a larger open source project (please donate if you use the form!)</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41278" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail1.jpg?323f2c" alt="" width="418" height="256" /></p>
<p style="text-align: left;">I decided to go with a pre-developed solution, because in all honesty, even though I know how to create a form and pass it to a script that I could write to process the information &#8211; why reinvent the wheel when there are such well developed packages already out there, and PHPMailer is absolutely one of them.</p>
<h3><strong>Download &amp; Configure PHPMailer</strong></h3>
<p style="text-align: left;">When you download the Zip file, you&#8217;ll discover 3 folders &#8211; <em>_lib, DOCS</em> and <em>sample_forms</em>. Now, the developers offer an amazing amount of documentation on their site and in the developer forums. But, to be honest, you don&#8217;t really have to change a whole lot to get a simple form working on your site.</p>
<p style="text-align: left;">In the &#8220;sample_forms&#8221; directory, you&#8217;ll find a few examples that the developers already created for you. In this article I&#8217;ll install the sample <em>form.html</em> and get it working with just a very few minor configurations. If you don&#8217;t have the ability to edit files on your web hosting account, then skip below to the edits before uploading the files. Otherwise, you can upload the files first.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41279" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail2.jpg?323f2c" alt="" width="501" height="294" /></p>
<p style="text-align: left;">Keep the same directory structure, and make sure that the HTML file with the form is only one directory up. If you want otherwise, you&#8217;ll have to change how the form references the PHP script (see below). Actually &#8211; I messed up when I uploaded, you really only need the _lib folder and the HTML file &#8211; the DOCS folder is simply for your information.</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-41283" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail32.jpg?323f2c" alt="" width="556" height="372" /></p>
<p style="text-align: left;">Go into the _lib folder and edit the <em>form.config.php</em> file. This is where you can really fine-tune how your form behaves. The only required edit is to configure where the post is going to go. I&#8217;ve also added the &#8220;<em>subject</em>&#8221; field, because I want to use this form on multiple websites, and when it arrives in my mailbox I want to know where it came from &#8211; the Subject line will tell you that.</p>
<p style="text-align: left;">To enable any of these features, all you have to do is remove the comment code &#8220;//&#8221; and you&#8217;re good to go.</p>
<h3><strong>An Example Of The Form In Action</strong></h3>
<p style="text-align: left;">To demonstrate the form, I&#8217;ve copied the example <em>form.html </em>onto my website. This is what it looks like.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41284" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail4.jpg?323f2c" alt="" width="506" height="442" /></p>
<p style="text-align: left;">I love this&#8230;look how simple the form is, and you can embed it anywhere you want on your webpage. It has &#8220;required&#8221; field functionality so the user can&#8217;t submit the form without at least offering their name and email address, and of course it has exactly what we&#8217;re looking for &#8211; two upload fields where the visitor can attach up to two files.  Here&#8217;s what the sample FORM code looks like (this is the form you&#8217;ll embed into your own web page).</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41285" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail5.jpg?323f2c" alt="" width="502" height="124" /></p>
<p style="text-align: left;">There are two ways you can take this. Either copy all of the code in the <em>form.html</em> sample file from the &lt;style&gt; tag down, or you can pluck out just the FORM elements and insert them into your own customized form, formatted the way you want. This is most likely the approach I will take.</p>
<p style="text-align: left;">The only critical part of this is that the &#8220;action&#8221; should point to the location of the &#8220;<em>phpmailer-fe.php</em>&#8221; script. Now that I&#8217;ve got the <em>form.html</em> ready to go, and the form configuration file customized to send to my email address and include a subject, it&#8217;s time to test and see what happens. I went to the form and submitted just my name, email, and attached a picture of a wolf. A second or two after submitting the form, this is what arrived in my Inbox.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41287" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail6.jpg?323f2c" alt="" width="452" height="445" /></p>
<p style="text-align: left;">You&#8217;ll notice that the email header has the sender as the email address entered in the form, and the subject line tells you which website sent the form. Best of all, take a look at what&#8217;s attached to the email.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41288" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail7.jpg?323f2c" alt="" width="337" height="324" /></p>
<p style="text-align: left;">Sweet! So, with just a couple very minor configuration file edits, you can now allow your visitors to send a file via email HTML form &#8211; and you didn&#8217;t have to write a single line of code.</p>
<h3><strong>Customizing The Behavior Of Your Form</strong></h3>
<p style="text-align: left;">Before concluding, there is one little thing that&#8217;s important to modify if you want the form to appear professional. Currently, upon successful submission, it refers the visitor to this funny-looking web page by default.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41290" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail8.jpg?323f2c" alt="" width="364" height="202" /></p>
<p style="text-align: left;">That animated &#8220;<em>Processing&#8230;</em>&#8221; bit is actually just an animated GIF &#8211; there&#8217;s no magic behind it. This page is defined in the <em>form.config.php</em> file I referenced above. To customize the response pages, just open up that file again, remove the comment slashes &#8220;//&#8221; for those fields and replace the&#8221;<em>replyemailfailed.html</em>&#8221; entry and the &#8220;<em>replyemailsuccess.html</em>&#8221; entry with your own customized success or failure webpages.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-41291" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/04/phpmail9.jpg?323f2c" alt="" width="480" height="233" /></p>
<p style="text-align: left;">I would definitely suggest going through that config file and exploring all of the ways that you can tweak how this form behaves. PHPMailer is a very versatile and useful pre-packaged form processing script that you can use for a wide variety of purposes on your website. Why reinvent the wheel when someone has already invented such a well-made and powerful car? All you have to do is get in and drive!</p>
<p style="text-align: left;">Do you have a use for PHPMailer on your website? Do you use your own tools or techniques to easily add forms to your site where visitors can attach files? Share your insight in the comments section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/visitor-send-file-email-html-form-phpmailer/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Collabtive &#8211; A Free Open Source Project Management Software</title>
		<link>http://www.makeuseof.com/tag/collabtive-a-free-open-source-project-management-software/</link>
		<comments>http://www.makeuseof.com/tag/collabtive-a-free-open-source-project-management-software/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 01:31:04 +0000</pubDate>
		<dc:creator>Abhigyan</dc:creator>
				<category><![CDATA[Web Apps & Internet]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[planning tools]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[task manager]]></category>
		<category><![CDATA[time management]]></category>
		<category><![CDATA[tracking tools]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=32413</guid>
		<description><![CDATA[Managing projects can be tricky, time-consuming and confusing. It&#8217;s easy to lose one&#8217;s way when faced by a myriad of tasks, each with its own deadline. Project management requires a manager to be alert at all times. It is, in essence, the art and science of managing everything that is related to a project (be [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin-right:20px" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/33012_9986.jpg?323f2c" alt="" vspace="5" align="left" />Managing projects can be tricky, time-consuming and confusing. It&#8217;s easy to lose one&#8217;s way when faced by a myriad of tasks, each with its own deadline. Project management requires a manager to be alert at all times. It is, in essence, the art and science of managing everything that is related to a project (be it tasks, team members, deadlines, etc.). When all aspects of a project mesh together without causing any disruptions, we have what we call a successful project.</p>
<p>Managing projects is not an easy task. In fact, the need to use project management software is increasing by the day. The need to structure and organise various projects/processes is become more and more dire. Offline and standalone solutions are just not good enough anymore. However, not everyone (or for that matter, every company) has the budget required to go for Microsoft Project or similar management solutions. And this is where Collabtive steps in.</p>
<p><a href="http://collabtive.o-dyn.de/">Collabtive</a> is open source project management software. It is a PHP based (which means it can be run on almost any computer, which has a browser capable of understanding PHP) project management system. Collabtive allows you to manage projects by setting up different tasks and assigning them to different users. The progress of these tasks can then be tracked using the easy interface of the application. The administrator can add multiple users to the application and each user can access the interface through his/her browser. There&#8217;s practically no limit to the number of users that can work simultaneously on Collabtive. Although it doesn&#8217;t provide advanced features such as Gantt charts, it does provide for a very simple and efficient mechanism to keep track of your projects.</p>
<p><span id="more-32413"></span><br />
In order to use Collabtive, you need to have PHP support on your system(s). I got that by installing <a href="http://www.wampserver.com/en/" target="_self">WAMP</a>. The installation process in itself is very simple and quick. After extraction, you just need to point your browser to the install.php file to launch the installer. Once installed, you are greeted with the following login screen.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/collab1.jpg?323f2c" alt="open source project management software" width="570" height="397" /></p>
<p>Once you login with your credentials, you are greeted by what the Collabtive team call your Desktop. The Desktop shows you a list of all current projects, a tasklist, as well as a calendar showing your tasks and milestones.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/collab2.jpg?323f2c" alt="open source project management software" width="570" height="349" /></p>
<p>Clicking on a project name takes you to the project page. This page is also called the Project Dashboard. The Project Dashboard consists of a calendar specific to a particular project. It also consists of a Timetracker, using which you can track the amount of time that you have spent working on the project. There is also an Activity Log, which contains a step-by-step listing of all the activities pertaining to the project.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/collab11.jpg?323f2c" alt="open source project management app" width="570" height="316" /></p>
<p>This page also contains a number of icons at the top, which allow you to visit your Milestones page, review your Tasklists, access the Messaging system, as well as access the file repository for a particular project. There is also a User tab, which shows a list of all the users currently using the Collabtive system for a project.</p>
<p>The tasklist allows you to create tasks, which may be critical to the project. Each task can have an associated due-date and can be assigned to one or multiple users. These tasks, once completed, can simply be &#8220;finished&#8221; by clicking on the tick-mark next to them.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/collab7.jpg?323f2c" alt="project management software online free open source" width="570" height="300" /></p>
<p>The Milestones can be looked upon as distinct phases in the project timeline. Each milestone may have a number of tasks associated with it. As and when tasks are finished, a status bar for the project under consideration keeps increasing on your Desktop.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/01/collab6.jpg?323f2c" alt="project management software online free open source" width="570" height="343" /></p>
<p>The right hand side pane across all pages provides a search bar, a simple text-based calendar, and a list of users who are currently online. The search bar searches across tasks, milestones, as well as entire projects. Also, each user can fill out his/her profile page so that different team members have ways and means to contact one another.</p>
<p>All in all, Collabtive provides for a very elegant project management system. It may not be as power-packed as its commercial counterparts, but it provides more than a decent feature set to keep track of all the tasks and milestones associated to your project.</p>
<p>Collabtive can be used in a number of scenarios. It can be used to track curriculum progress in schools. It may also be used by manufacturers to track the status of various orders. For students, it can be an ultimate collaboration platform, where they would be able to share notes, homework, even entire assignments and research. And last, it can be used as a simple calendaring application.</p>
<p>If you are a a project manager (and hate the commercial Silicon Valley giants, just like yours truly), making the switch to <a href="http://collabtive.o-dyn.de/">Collabtive</a> should top your list of things to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/collabtive-a-free-open-source-project-management-software/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Daft Logic &#8211; A Quirky But Cool Website You Should Check Out</title>
		<link>http://www.makeuseof.com/tag/daft-logic-a-quirky-but-cool-website-you-should-check-out/</link>
		<comments>http://www.makeuseof.com/tag/daft-logic-a-quirky-but-cool-website-you-should-check-out/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:01:02 +0000</pubDate>
		<dc:creator>Paul Coffman</dc:creator>
				<category><![CDATA[Web Apps & Internet]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[travel tips]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=29709</guid>
		<description><![CDATA[Occasionally I need a break from sitting at the desk in front of the computer. One of the ways I stay in touch with the real world is to get out there in it. My family and I enjoy taking bike rides on a regular basis. We load up the bikes and head off in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin: 5px;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/IMG001931.jpg?323f2c" alt="cool websites" vspace="5" width="200" align="left" />Occasionally I need a break from sitting at the desk in front of the computer. One of the ways I stay in touch with the real world is to get out there in it. My family and I enjoy taking bike rides on a regular basis. We load up the bikes and head off in search of parks, beaches, trails, or scenic areas. We unload and then enjoy a spontaneous, exploratory bike ride.</p>
<p>Recently, during one of these trips, we found ourselves riding for miles down the beach. We suddenly realized we eventually would have to turn around and pedal back. On the way back, we had a breakdown, and ended up having to walk part of the way back until we found a store where we could pick up the tools to fix the bike. When we got home I decided to go online to see if I could figure out exactly how far we actually traveled.</p>
<p>That&#8217;s when I came across the very cool website <a href="http://www.daftlogic.com/">Daft Logic</a>. Daft Logic bills itself as</p>
<blockquote><p><em>a collection of resources, tools and information with no overall theme except to see what can be done with modern web API&#8217;s (application programming interface) tools and programming languages. The usefulness or originality is a bit hit and miss but that&#8217;s not a bad thing.</em></p></blockquote>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/main2.png?323f2c" alt="" width="570" height="482" /></p>
<p><span id="more-29709"></span><br />
Daft Logic is a little odd and quirky but I kind of like that. The website has a clean, simple, and straightforward design. The site is divided into seven primary sections, the three coolest of which are the <em>Projects</em> section, the <em>Sandbox</em> section and the <em>Information </em>section.</p>
<h3><strong>Map Projects</strong></h3>
<p>The <a href="http://www.daftlogic.com/projects-google-maps-distance-calculator.htm">Google Maps Distance Calculator</a> is the reason I stumbled upon the website, and I have bookmarked this page for future use. This is found on their <a href="http://www.daftlogic.com/projects.htm">Projects</a> page. If you are a biker, hiker, runner, jogger, or walker, this simple tool can help you plan a route or simply see how far you&#8217;ve gone with a few clicks. Mapping my family&#8217;s adventurous marathon, I realized we had biked over 11 miles! Pretty good for casual riders.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/map5.png?323f2c" alt="draft logic" width="548" height="339" /></p>
<p>I like the segment-by-segment function, in that you can click around turns and angles and get a more accurate distance calculation, or you can simply click a beginning and ending point and get an &#8220;as the crow flies&#8221; distance. The map is simple to use and offers a km, mile, feet, meter or nautical mile distance selection.</p>
<p>Out of curiosity, I mapped out our neighborhood to see how many miles riding each street adds up to and compared this to the estimate I made with my vehicle&#8217;s odometer. The result was very accurate. My car showed 2.3 miles and the distance calculator showed 2.341 miles.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/nhood41.png?323f2c" alt="really cool websites" width="448" height="179" /></p>
<p>There are several other <a href="http://maps.google.com">Google Map</a> mashups listed on their Project page, including a <a href="http://www.daftlogic.com/projects-google-maps-guestbook.htm">Google Maps Guestbook</a> where visitors to a site can click their location and add comments. There is also a <a href="http://www.daftlogic.com/projects-send-position.htm">Send A Position Map</a> where you click a location and Daft Logic provides a url that you can email to a friend that will link back to the map with the position displayed.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/position21.png?323f2c" alt="really cool websites" width="486" height="233" /></p>
<p>There is also an advanced version of the distance calculator that allows you to save a route on a map. They may not be reinventing the wheel, but having all of these map features on one site is certainly cool. The site authors have provided some code and downloads for you to use some of these tools on your own site.</p>
<h3><strong>Other Projects</strong></h3>
<p>There are some useful PHP projects to be found <a href="http://www.daftlogic.com/projects.htm">here</a> as well. One is a tool that converts an email to a jpg file and there is one that converts text to a png file. These are handy if you want to display an email address, but don&#8217;t want the email to be picked up by spammers. Also under the PHP category are a &#8220;<em>What is My IP?</em>&#8220;, and a &#8220;<em>What is My Browser?</em>&#8220; tool.</p>
<p>Included on the <em>Projects</em> page are several Macromedia Flash projects, including a few neat little games like Towers of Hanoi and Tic Tac Toe.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/toh1.png?323f2c" alt="really cool websites" width="500" height="357" /></p>
<h3><strong>Sandbox</strong></h3>
<p>On the <a href="http://www.daftlogic.com/sandbox.htm">Sandbox</a> page are all the projects where ideas are being developed and demonstrated. Users can play around with the projects, provide feedback, and the developers consider whether to continue with the development of the tool.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/sandbox1.png?323f2c" alt="cool tools website" width="492" height="577" /></p>
<p>Many of these are built around <a href="http://maps.google.com/">Google Maps</a>. One tool will find the nearest <a href="http://www.flickr.com/">Flickr</a> photo from a clicked point on a map, and another tool will reverse look up the nearest address to a point clicked on the map.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/geocod1.png?323f2c" alt="cool tools website" width="560" height="185" /></p>
<h3><strong>Information</strong></h3>
<p>Finally, the <a href="http://www.daftlogic.com/information.htm">Information</a> section includes some articles the site authors have penned regarding programming tricks and tips and various KMZ files for finding neat stuff on Google Earth.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/11/info1.png?323f2c" alt="cool tools website" width="514" height="309" /></p>
<p>Daft Logic seems to be a website done by a bunch of folks sitting around playing with simple programming and ideas, with an extreme interest in maps, time, <a href="http://maps.google.com">Google Maps</a> and <a href="http://earth.google.com">Google Earth</a>. Yes, some of it is a bit daft but it&#8217;s still cool, quirky, geeky and fun!</p>
<p>Now, since I rode the tires off my bike yesterday, I&#8217;ll be playing around on Daft Logic when I need a break!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/daft-logic-a-quirky-but-cool-website-you-should-check-out/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>6 Free Sites To Learn About Programming in PHP</title>
		<link>http://www.makeuseof.com/tag/6-free-sites-to-learn-about-programming-in-php/</link>
		<comments>http://www.makeuseof.com/tag/6-free-sites-to-learn-about-programming-in-php/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 14:01:00 +0000</pubDate>
		<dc:creator>Jack Cola</dc:creator>
				<category><![CDATA[MakeUseOf Lists]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=22824</guid>
		<description><![CDATA[Many websites just like this one, and sites like Wikipedia, utilize the power of PHP programming to create dynamic sites. Wow you think. How do I create a website like that for myself? I now want to learn about programming in PHP, but where do I start? If you don&#8217;t know where to start, here [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin-right:20px" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/phpnet.png?323f2c" border="0" alt="phpnet" vspace="5" align="left" />Many websites just like this one, and sites like Wikipedia, utilize the power of PHP programming to create dynamic sites. Wow you think. How do I create a website like that for myself? I now want to learn about programming in PHP, but where do I start?</p>
<p>If you don&#8217;t know where to start, here are 6 great sites to learn PHP programming online for free.</p>
<h3><strong><a href="http://www.php.net">PHP.net</a></strong></h3>
<p>The first place to look at is PHP.net. This is PHP&#8217;s official website. This site has everything you need to know about PHP. So when you definitely know that you want to create a website in PHP, start the <a href="http://au.php.net/tut.php">tutorial</a> and get busy.</p>
<p><span id="more-22824"></span><br />
Once you have learned the basic introductory concepts to creating a PHP based website, it is time to look at the <a href="http://www.php.net/manual/en/">user manual</a>. Everything you need to know is there. Once you have finished reading, you should now be a PHP expert. If not, here are some other site links which provide you with the PHP scripting basics.</p>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/phpnetmanual.png?323f2c" border="0" alt="programming PHP" width="345" height="436" /></p>
<h3><strong><a href="http://www.w3schools.com/">w3 Schools</a></strong></h3>
<p style="text-align: center;"><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/w3schools.png?323f2c" border="0" alt="php tutorial" width="468" height="69" /></p>
<p>w3 Schools offers tutorials for programming inPHP and other scripting languages, but we are going to focus on the <a href="http://www.w3schools.com/PHP/">PHP section</a>.</p>
<p>At w3 Schools, you can learn the basics of PHP such as the syntax, variables, strings, arrays, selection and loop statements, how to use forms and much more. Once you have mastered the basics, you can then go onto the advance stuff such as includes, file uploads, cookies, sessions, and how to send secure emails.</p>
<p>The next section is to learn how to implement a database, which nearly every PHP website needs to have. This section looks at how to connect, create and alter a database and its data.</p>
<p>So you think you are done learning? Nice try. We still have heaps more to learn. There is PHP and XML, PHP and AJAX, and PHP and References still to go. Once done and you think you know everything there is to programming in PHP, try the online quiz, then attempt the exam.</p>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/w3schoolsphp.png?323f2c" border="0" alt="w3schoolsphp" width="570" height="486" /></p>
<h3><strong><a href="http://www.learnphponline.com/">Learn Programming in PHP Online</a></strong></h3>
<p>Although Learn PHP Online is not as detailed as W3 Schools or PHP.net, it does provide useful tutorial scripts on how to do basic things such as find odd or even numbers, learn the difference between echo and print, create email activation for registration forms and learn how to prevent SQL Injection attacks.</p>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/learnphponline.png?323f2c" border="0" alt="learnphponline" width="570" height="309" /></p>
<h3><strong><a href="http://www.phpbuddy.com">PHPBuddy</a></strong></h3>
<p>PHPBuddy contains articles and tutorials on how to do basic PHP tasks such as how to work with Sessions, and encrypting and protecting your PHP code, so it is worth checking out.</p>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/phpbuddy.png?323f2c" border="0" alt="phpbuddy" width="470" height="597" /></p>
<h3><strong><a href="http://php.about.com/">About.com:PHP/MySQL</a></strong></h3>
<p>About.com has a whole section on learning PHP and MySQL. You can learn about the PHP functions, loops, how to use PHP and HTML together, how to use time and calendars, create forms, use redirection, countdowns and simple math functions.</p>
<p>The MySQL section provides you with everything you need to know on using a database with PHP. Some advance skills include uploading files and using encryption. About.com also has free scripts and tutorials on how to send emails, creating a simple address book, calendars, login scripts and creating polls.</p>
<h3><strong><a href="http://www.tizag.com/phpT/">Tizag</a></strong></h3>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/tizag.png?323f2c" border="0" alt="tizag" width="465" height="103" /></p>
<p>Tizag contains everything you need to know about programming in PHP. It provides basic tutorials on how to print data to the screen using variables, how to use loops and if/else statements, how to use POST and GET commands, how to use strings, sessions and cookies. Although you may already know these from the other sites, it is still useful to check out.</p>
<p style="text-align: center;"><img class="aligncenter" style="border:1px solid black" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2009/08/tizagdemo.png?323f2c" border="0" alt="tizagdemo" width="512" height="350" /></p>
<p>So I hope these 6 websites help you to become a PHP master. When you do, please be sure to let us know in the comments.  If you have used these sites before or other sites that we might have missed to learn PHP, tell us your thoughts and comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/6-free-sites-to-learn-about-programming-in-php/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (Requested URI is rejected)
Database Caching 1/41 queries in 0.048 seconds using apc
Object Caching 755/846 objects using disk: basic
Content Delivery Network via main.makeuseoflimited.netdna-cdn.com

Served from: www.makeuseof.com @ 2012-02-10 13:09:08 -->
