Archive for the 'PHP' Category

Protecting sensitive personal data with encryption

It is a common situation to want to store data about a person in a database. For example their name, address, phone number etc. In many countries it is illegal to store this data without some form of protection but even without such a law it is common courtesy to look after this data to the best of your ability. You don’t know how well your hosting company looks after this data so why take the risk. This data should be encrypted.

This tutorial will show you a simple example of a user registration system. It hasn’t been designed as a class you can plug in to your application. Instead it is a tutorial to show you how to use the mcrypt functions within your application.

This is not a complete solution to your security worries! You will almost certainly need to consider other factors to build a secure application but this is a good start. So if your hosting company (or government department!) puts your database on a couple of cds and puts them in the post (mail) you can sleep better at night knowing your data is safe.

htaccess: Stopping “page not found” errors

Stop Page not found errors when you restructure or move your site
Its a problem I come across often. Someone does a complete site redesign and all the filenames and paths have changed. They are really pleased with their new site. It looks good and works well. But what they don’t realise is their users aren’t so happy. Why? Well perhaps they have bookmarked one of your old pages. Or perhaps they type a search phrase into a search engine and it returns a link to your old pages. In both cases they will get “Page not found”.

Paypal IPN: receiving instant payments in your web application.

This tutorial explains how to use Paypals IPN system with a simple single item purchase.Instant Payment Notification allows you to integrate your PayPal payments with your website’s back-end operations, so you get immediate notification and authentication of the PayPal payments you receive. The main use of IPN is where your website needs to know immediately that payment has been made. For example you might have sold something that you will then make available for the user to download.

There is a lot of information on the Paypal website which is worth looking at but the following tutorial will show you in detail a real world example of how to use it.