This is my screencast for the Nettuts/Screenr screencast competition. I feel as though I rushed it because I had to do it under 5 minutes but I hope you learn a thing or two from it.
Every website needs a way of contacting the people behind it and putting an email on a page is not such a good idea; because bots can easily pick up this email address and send spam to it. This is where a contact form comes in very useful because people can send you messages but do not get your email address. (more...)
A few days ago I was developing a website for a client. They required that there be a map showing where addresses are that were retrieved from a database. I have never properly looked at the Google Maps API before because I have never needed to use it; so for the first time I looked at it and gave it a try. Then after playing around with it for a bit i realised that reverse geocoding was needed to convert the address into latitude and longitude figures.
Because I was programming this website in PHP I thought I would have a look around for a PHP class to see if there was a quicker way of doing this. Luckily enough I found a PHP class called PHP GoogleMapAPI. It took me a few minutes to read through the documentation for this class but it was so straight forward and simple. All in all it takes only 6 lines of code using this class to create a google map and locate it to an address; because it does all the other work for you that you don't need to know about if you're not going to be programming Google Maps every day of your life.
There are a number of frameworks available for PHP such as CodeIgnitor, Zend, Symfony, Kohana and many more. In this article you will find tutorials that I have found on the web that will help PHP programmers that are new to the MVC pattern or CakePHP.
CakePHP is an amazing framework if you know how to use it, but the documentation for CakePHP is quite badly written and can cause confusion for new users. Here are a few links to try and make life easier for new and experienced CakePHP users.
- Validation with CakePHP
- Theming with CakePHP
- Getting started quickly with Scriptaculous effects
- Drag 'n drop tutorial with the CakePHP 1.2 Ajax helper, Prototype framework and Scriptaculous library
- Secure CakePHP via Sessions & Magic (Login / Logout)
- CakePHP ACL Tutorial
- CakePHP Bake - Baking Models, Controllers and Views the CakePHP 1.2 Way
- Cascading Dynamic Meta Tags and Page Titles in CakePHP 1.2
- jQuery image upload & crop
- Uploader - Plugin
In this tutorial you will learn about writing information to a text file and then retrieving the information you wrote to the text file. Retrieving the files that are in a directory and about arrays.
This is a quite basic script and there isn't much to write about it so if there is something that you don't understand look the function up within the PHP manual online.
(more...)
The plugin that I'm going to show you how to create within this post is a plugin that I created for MakeUseOf.
Creating plugins for WP is relatively easy and uses actions to call functions that are included in pages within the main WP files. To learn more about creating plugins for WP go here.
Ok so lets get started with creating the plugin.
When creating a plugin for WP make sure that you include your own unique word or acronym to your functions so that they don't conflict with any other plugins that may be installed.
Because I created this for MakeUseOf the acronym I use is MUO and then AF because I named the plugin author footer so every function within this plugin begins with MUO_AF.
(more...)
I'm sure if you've been programming for a few years that you've come across when you need to check if something equals something than do something else a few times.
Well the best way to do this is like so.
Say for example we have a variable called $num and the value of it is 5.
(more...)
Email is used by most people that use the internet and is good for sending activation codes and notifications to users when you have a website.
To send an email you use the mail() function and it requires 3 parameters.
RSS Feeds are widely used throughout the internet today and on all kinds of websites. From websites like Digg to most blogs. If you want to display an RSS feed on your website its probably easier than you think.
For this example I'm going to show you how to display the RSS feed for The Tutorial Blog using PHP.
