Variables, Numbers and functions in PHP

Beginner, PHP, Tutorials4 Comments
post-thumb

I haven't done many PHP Tutorials recently so I decided I'd be writing a couple of PHP tutorials over the new few days, pretty basic stuff nothing complicated. In this tutorial were going to be learning about variables and numbers in PHP, im going to show you how they work and how you can use them, you'll also learn how to create your own variables and how to use pre-defined variables. You'll also see how they work and how you can apply them to future scripts that you may make in the future!

Read the rest of this entry »

Creating a localhost in Windows (Part 2: Installing PHP 5)

PHP, Tutorials, Website Development2 Comments
post-thumb

In part one we setup a Apache server and configured the localhost ready for you to use, we also set up the directory where you are going to save your local files. But so far in part one we only essentially setup the localhost, so all of the goodness of being able to view server side documents/script etc won't work yet as you will need to install them, one of the most popular if not the popular server side code is PHP. It is used mostly to create dynamic webpages, but the great thing about PHP is that can be used combined with XHTML, CSS, Javascript etc, with PHP there are many functions and arrays that can expand what a simple plain XHTML document can do. Anyway lets install PHP!

Read the rest of this entry »

Creating a PHP File/Image Uploader

PHP, Tutorials, Uploaders15 Comments
post-thumb

Uploaders are scripts that give a user the ability to upload a file/image to a certain space defined in the script that runs the uploader, im sure the websites such as Imageshack and Photobucket are familiar to you, and there many services out there, but wouldn't it be nice to create your own little uploader service? Well in this tutorial you will create a small uploader that is quick, easy and customizable to your liking. Includes a great little feature that generates embed codes for you.

Read the rest of this entry »

Using query strings to organise content

Content Management, PHP, Tutorials1 Comment
post-thumb

If you pay attention to URL's you may notice those fancy URL's that are structured like with parts like ?ID=1 in them. This can be achieved in a number of ways, however some methods are complex, and some are relatively easy. In actual fact there's something in PHP called query strings and although it's not the best way to do it, you can use query strings to generate special structures like ID numbers and such. In this tutorial you will be show a simple way of being able to do this.

Read the rest of this entry »

Silently record a user IP address

PHP, Tutorials, User Information2 Comments
post-thumb

If your website has a feature such as uploader and you want to track the people that use it, then you may want to consider using some sort of record script that will record information to somewhere. After all you are providing a open service to anyone, so if someones abusing it you need to know and be able to block the abusers from damaging your website. In this tutorial you will see how you can create a script that will silently record a user IP address and store all information in a .txt file, no database required!

Read the rest of this entry »