Print Design Templates Take a look at these creative Graphic Design templates for brochures, flyers, newsletters, stationery, postcards, ads, menus and posters for a variety of businesses.
Invoicing 4 Freelancers A complete, secure, online billing application that maintains hourly service billing, flat fee billing and recurring charges. Integration with Authorize.Net and other leading payment gateways provides hands-free recurring billing with a sophisticated CRM system.
Free Design Magazines Browse through our extensive list of free Graphic Design, Web Design, Business, Computer, and Computer Graphics magazines, white papers, downloads and podcasts to find the titles that best match your skills and interests; topics include management, marketing, operations, sales, and technology. Simply complete the application form and submit it. All are absolutely free to freelance professionals who qualify.
Suggested Links Photoshop Tutorials
Logo Designer's Logos
Web Design Tools List
Layouts & Templates Directory
Web Design & Graphic Design Blog
Photoshop, Flash, 3D Studio Max Tutorials
Web Designers & Developers
Crafts for Kids
Photoshop Tutorial Man
Tutorial Guide -- Free Webmaster Tutorials
Design Contests
How to Draw
Work From Home Job Search
OTHER SITES WE OWN
AllFreelance
Graphic Design Resources Directory
Graphics Tutorials Directory
Social Networking Articles
Design Sites Up
All Freelance Work & Portfolios
Graphic Design Community
Education & Learning Directory
![]() |
home > Web Design Tutorials > Programming Tutorials > PHP TUTORIALS AND PHP RESOURCES
PHP Nav - Create those ?id=page links and learn how to insert content into your site…
Click Counter
Create a popular click counter…
Password Protect
Password protect areas of your site…
Ban Users IP
Need to ban someone? This simple tutorial shows you how…
Simple Redirect
Redirect a page with this simple php code, no more javascript…
Display The Time
Display the current time with PHP in this simple tutorial.
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
Last Modified
Display when a page has been last updated with this simple code.
Simple PHP Nav
This tutorial explains how to include various parts of your layout on your site.
Show IP
Display ther person's IP on your site with this simple code…
Random Image Display
Create a simple random image display. This code can easily be adapted to display other random things, such as quotes etc.
Upload System
Create a simple upload system using a form and some simple php code.
Develop rock-solid code in PHP
This tutorial is intended for both amateur and professional PHP programmers who want to design and write quality functions. To complete this tutorial, you must have a basic level of working knowledge with PHP, and know how to define functions.
PDF Generation Using Only PHP: Part 1
This tutorial is intended for the PHP programmer who needs to incorporate PDF generation in a script without using external libraries such as PDFlib (often unavailable due to licensing restrictions or lack of funds).
PDF Generation Using Only PHP - Part 2
This tutorial is intended for the PHP programmer who needs to incorporate PDF generation in a script without using external libraries such as PDFlib (often unavailable due to licensing restrictions or lack of funds).
Writing Libraries in PHP
This tutorial is intended for PHP programmers who are interested in writing reusable code. Experience with PHP4 and familiarity with writing classes are assumed. The article is primarily geared toward programmers who are new to writing code libraries, but experienced programmers may find the article informative as well.
Paypal, the PHP approach
This tutorial is intended for PHP programmers of all levels, who wish to add Paypal functionality to their website. The programmer needs only a PHP enabled website and Paypal account.
Using PHP and XSL to Transform XML into Web Content
This tutorial is for developers who have been looking for ways to use XML to manage web content, and XSL to style and format that content. You should be familiar with XML, and having some experience with XSL would be helpful.
Develop rock-solid code in PHP
This is the first in a series of articles intended for developers who are interested in building medium-to-large PHP based Web applications. The Develop rock-solid code in PHP series is about solving practical, real-life problems. In this series you'll learn how to rise above making quick-and-messy solutions, and to develop code that you can reuse later in other applications.
Error Handling: Stepping beyond True/False Results
This article is intended for the intermediate to advanced PHP programmer. Basic knowledge of creating and using functions and classes is assumed.
Web Services with NuSOAP
This article is intended for the experienced PHP programmer, who is interested in developing web service with SOAP using a PHP-based toolkit.
PHP Templating with Smarty
This article is intended for PHP programmers and HTML designers interested in applying a new technique for web development – PHP templating. Advanced knowledge of PHP programming and HTML is assumed.
Hands on XML
This tutorial is intended for PHP programmers who want to get a quick start on parsing XML and "getting the data out". Experience with PHP4 and familiarity with XML syntax are assumed.
Using Objects to Create an Application
This tutorial is intended for readers interested in Object Oriented Design. Knowledge of PHP concepts is not necessary, but knowledge of PHP's OO syntax, and of working with PHP's mysql functions and objects, is assumed.
Using Perl Compatible Regular Expressions with PHP
This tutorial is intended for the PHP programmer interested in using Perl Compatible Regular Expressions (or PCRE for short) to match or replace values within its target…
Encryption and Decryption using PHP and GnuPG
The purpose of this article is to show you how to encrypt and decrypt information with GnuPG using PHP. Most of the major Linux distributions will install GnuPG upon request.
Static Free Energy
This tutorial is intended for the Intermediate PHP programmer. You will need access to your httpd.conf file, and have to feel comfortable editing that file. You also need to be running PHP 4 and to have output buffering turned on.
Creating a Web-Based Survey Part I: Dynamic Questions
This tutorial is written for the PHP developer interested in implementing dynamic surveys. Developers interested in an easy way to display survey questions, and edit them ‘on-the-fly’, will also benefit from this tutorial. If examples are followed strictly, a basic knowledge of PHP should suffice. However, an intermediate understanding of PHP and databases is assumed.
Using PHP to Develop Three-Tier Architecture Applications - Part 2
This tutorial is intended for PHP developers with a need to develop applications with goals of long-term flexibility and ease of maintenance.
XML: RPC Client
This tutorial is written for the PHP developer interested in implementing an XML-RPC client in PHP. Experience working with PHP classes and an understanding of the HTTP protocol are assumed.
Using output from other sites in your PHP scripts
This tutorial is intended for the PHP programmers who wish to use the output from other Web sites in their own scripts. A moderate understanding of PHP and HTML is assumed.
Inter-Platform Communication (IPC) Using PHP
This tutorial is intended for the expert PHP programmer with a conceptual understanding of networking theory. You will require access to a Web server running PHP4 (with FTP support), a Win32 machine with an FTP Server running on it (i.e. older versions of PWS have an integrated FTP Server), and a basic understanding of Windows Networking.
Using PHP with the OANDA Currency Exchange Rate Server
This tutorial is for those of you needing the services of the OANDA currency rate server, especially if you develop shopping carts or other e-commerce services for online use. It will also serve as an example of using PHP's capability to connect to a remote server. Lastly, if you have a Unix-based system, the section on using cron may be useful to you.
Rotating Banner Advertisements with PHP
This tutorial is intended for the PHP programmer interested in developing a useful and dynamic banner advertisement system using mySQL, PHPLIB, and PHP version 4.0 or higher.
Serving Graphical Web Page Counters from a PHP Script
This tutorial is intended for PHP programmers interested in learning how to apply PHP's GD image manipulation support. Readers interested in learning how to access a MySQL database from PHP, and/or define a PHP function will also benefit from this tutorial.
An Introduction to Classes
This tutorial is designed for the intermediate to advanced-level PHP programmer.
Using Strings
A large portion of Web programming requires strings to be handled and generated, so knowing how to use and handle strings properly is extremely important for PHP programmers. This tutorial starts with the simple constructs used to create strings and moves through to more advanced techniques for string handling.
Dynamic Image Generation with PHP
PHP lets you do a lot more than simply generating HTML content, it is also a great tool to dynamically generate images on-the-fly. For example, you can…
Building WML Applications Using PHP
This tutorial is intended for the PHP programmer interested in using PHP to create basic WML pages. The reader is expected to be knowledgeable of MySQL and should be familiar with WML at an introductory level.
chainedSelectors: A Better Way to Drop-down a PHP List
This tutorial is intended for programmers interested in experimenting with complex user interface elements. In particular, this tutorial explores using PHP to generate JavaScript based on data in a database. Previous experience with JavaScript will help you appreciate the chainedSelectors class, but is not strictly necessary. You should be familiar with using MySQL's command-line interface.
Generating Advanced Web Page Statistics using PHP
This tutorial is intended for the PHP programmer interested in gathering and analyzing Website statistics in a presentable format using MySQL and PHP.
Building Dynamic Calendars using PHP
This tutorial is intended for the PHP programmer interested in setting up a calendar that stores events within a database using MySQL and PHP…
Using PHP to Develop Three-Tier Architecture Applications - Part 1
This tutorial is intended for PHP developers with a need to develop applications with goals of long-term flexibility and ease of maintenance.
Building a Time Management Billing System using PHP
This tutorial is intended for the PHP programmer interested in setting up a basic billing system that stores billing information within a database using MySQL and PHP.
Using objects to create an application
This tutorial is intended for those who have experience working with PHP's mysql functions, as well as with PHP objects. Knowledge of PHP concepts is not necessary, but knowledge of PHP's OO syntax is assumed. It is assumed that you know how to access a mysql table, and send information to a mysql table...
Building An Application Repository for Organizing your Web Site
This tutorial is intended for anybody thinking about building a large web site or reorganizing their current web site. Experience working with PHP include() and require() would be helpful, as well as experience working with FTP and shell commands.
Creating a "Text Version" Web Page On-the-fly - Part I
This tutorial is intended for PHP programmers interested in improving the “accessibility” of their web site by providing a text or "printer-friendly" version of their pages. It is assumed that you understand basic web server configuration, PHP, HTTP protocol, and HTML.
Developing Professional Quality Graphs with PHP
This tutorial is intended for the PHP programmer interested in applying PHP's GD image manipulation to chart data. This tutorial will focus…
Creating a “Text Version” Web Page On-the-fly – Part 2
This tutorial is intended for PHP developers who want to modify web pages on-the-fly, and who are interested in Object Oriented Programming and using the PDFlib functions.
An Introduction to PHP-GTK
This tutorial is designed for the intermediate/advanced PHP programmer or anyone who has an interest in learning the PHP GUI environment. It assumes you have knowledge of PHP classes (see An Introduction to Classes), as well as of functions.
Side Navigation with PHP
This tutorial is intended for the PHP programmer interested in creating a tiered side navigation panel for their website…
Creating and Maintaining a Hierarchical Directory
This article is intended for anyone interested in categorizing links (or any other data) so that users can click through a hierarchical “tree” of categories until they find the data they want.
Develop rock-solid code in PHP: Part two
You have a medium-to-large application to roll out and need to get the ground-work done quickly. You're in good company. The Develop rock-solid code in PHP series is about solving practical, real-life problems in medium to large-scale Web applications. This series will help you get the basics right, and avoid making quick-and-messy solutions.
How Not To Use A Template System
The purpose of this article is to show PHP’s inherent capabilities as a template engine for developers who don’t wish to learn another sub-language.
JavaScript Powered PHP Debugging
This tutorial is intended for PHP programmers who want a more transparent way to debug PHP applications. Experience with JavaScript window functions is assumed…
Alternating table rows
Learn a simple way to print out some resulting data in a beauliful and convenient form - as a table with differently coloured rows - be the means of php…
Part I: HTML form
Do you want to recieve real feedback from your visitors without leaving your address on your website in order not to let it be known to the spammers? Php can help you!
Part II: recieving the message
The next part of the story about a PHP-based method to manage a reliable feedback path from the visitors of your web-site providing that your address won't be known to spammers.
Part III: Reading and deleting the message
The final part of the trilogy about creating an antispam method of getting feedback. Now you know everything you need!
Using symbol @ in PHP
Do you know what does @ mean in PHP? You can write it before the name of the function to avoid some standart error warnings if the function call fails.
Setting Cyrillic for GD
Anyway even if you don't plan to use Cyrillic fonts in GD library, this tutorial is helpful if you want to learn how to create graphics dynamically.
File based guestbook
Here we have a single PHP script to add new records to the guestbook and also to show them on the page. It is a file based guestbook!
Including exchange rates
Here some advanced PHP script has been described. Though it solves a very concrete task the technique is useful when you need to fetch some data from any other page.
Multilingual page
This tutorial will teach you how to create multilingual pages. This means your visitors don't have to choose the language to view the page cause it is done automatically.
Links rotator
This script is useful for those who have no database access. Use just a few lines of this PHP code to output a random banner or random link into your HTML page.
Random image
You can learn here how to read the contents of a folder and output the random image into the page.
Simple password generator
The simplest password generator described here uses one cycle to concatenate random characters into the random sized string.
Echo and print
Do you know the difference between the common echo() and print() functions? Also you will find here a basic description of variable functions in PHP.
Page generation time
This page was generated in X minutes. If you have seen these messages you probably would like to learn how to implement them.
"Here document" output style
PHP also has the Here Document output style. It allows you to embed text data in your scipt.
Single and double quotes
Do you know that using double quotes in PHP can slow down the execution time?
Login and password check
Remember the form asking you to type your login and password? You can have it on your page too.
Registering simple statistics
Learn how to write a simple log script. It can capture IP and the time of the visit.
Redirecting URL
If you are moving from one hosting company to another, you should know how to keep your existing visitors and teleport them to a new location.
Include and require
hese two similar functions are used template the pages. Which one to use? Find out the difference.
Sending mail in PHP
It is much easier to send email from PHP than from Perl. Read this tutorial if you have any doubts.
File existance checking
It is a good practice to check if the file exists already before creating that file. Learn a proper function here.
File upload with PHP
Do you know how to create a PHP script for uploading files to your server? You should know two basic things: a proper piece of HTML code and a few lines of simple PHP.
Multiple selection boxes
Do you know how to arrange multiple selection input fields on your HTML page ? Read details in this tutorial.
CGI environment variables
Below are the CGI environment variables, set by Apache web-server, when running a script. If you use PHP these variables can be accesed used dollar sign, in Perl you should write…
Simple Calendar
Shows you how to make a simple calendar with alternating day colors and highlight current day with a special color.
Split all characters in a string
Shows you how to split all characters from a string. Example: String = "blah"; echo this...
Recursive Directory browsing
Returns all files in all directories lower than the specified area. This Tutorial makes use of a previous tutorial here.
Get the extension of a file
Gets the extension of a file on the fly, x.y.z.gif returns gif, h.j.k.jpeg returns jpeg.
Get directory from string
Returns the directory from a string. EX: /test/ FROM /test/blah.php Shows how to create functions, use explode(), count(), while() and preg_replace() functions.
Get PHP_SELF without the slashes
Get the current page name without all the directories or slashes.
Get the title of a page (Remote or local)
Shows how to make functions, read files, and preg match things all in one.
Fail safe include / require
How to avoid those ugly errors while including a file that does not exist.
Upload class with error checking
Shows you how to set error reporting, create a class with a function to upload files, rename the files being uploaded on the fly and more.
How to create and use classes
Shows you how to create and use classes, variables inside classes, functions inside classes etc.
Simple login script
This is a simple login script that allows you to login to your website and stay logged in.
Ban IP
This short snipplet will help you setup a ban system based off a mysql database…
Random Quote
Shows you how to make a random quote script where it pulls a random line from a txt file.
PHP Expandable Menus 2 (Multi open)
Allows you to make expandable menus with PHP. This versions allows multiple menus to be opened / closed, click one menu to open - click another to open the other - click the first or the second to close it, you can open as many or as few as you like and are not forced to close it again. PAGE MUST BE RELOADED (PHP isnt Javascript).
Expandable menu with PHP
Allows you to make expandable menus with PHP. This versions allows 1 menu open, click a different menu and it closes the current one and opens the other. PAGE MUST BE RELOADED (PHP isnt Javascript).
Math with php
Learn to Add, Subtract, Multiply and divide using php.
Round UP
Shows you how to take a number like 1000.000000001 and round it to 1001.
Javascript Redirect
Shows how to use a Javascript redirect with php…
Javascript Confirm Box
Shows how to use a javascript alert with php…
Adds dynamic watermarking to an image
This puts a WaterMark on top, of a pre-existing image and outputs the image…
Add a WaterMark to bottom right of an image
This puts a WaterMark on top, in the lower right hand corner, of a pre-existing image and outputs the image.
Uploading files VIA FTP
Shows you how to connect to a FTP, login to that FTP, and upload a file.
Uploading files
Shows you how I made my upload files form(s) in the Media Administration area…
Create Your Own Custom API
I'll teach you how you can develop your very own customized API and web service system. But there are a few things I must mention before you go further.
Processing XML with PHP
A markup language is a collection of directions and special symbols that are inserted throughout a document. These directions can identify special sections of a document and further define the information's background and meaning.
Transforming XML with XSLT and PHP
In one of my previous tutorials, Processing XML with PHP, I introduced you to the expat XML parser. The parser is sufficient for extracting information from an XML document and manipulating it in a simple event based manner. However, there may be times when it's desired to transform the XML document into a different format using XML StyLesheet Transforms (XSLT).
Using SOAP with PHP
Unless you have been living in a cave somewhere without Internet access for the last few years, you have undoubtedly heard of XML, SOAP and Multi-Tiered Application Programming. If you are like many programmers, including myself, you were quite taken aback by these ideas and technologies. You may have gone so far as to simply dismiss them as irrelevant to your skill set. It's time to wake up and realize they're here to stay...
Remote Procedure Calls with PEAR::XML-RPC
Remote procedure calls enable developers to create distributed applications. Various program components, perhaps some of which may be considered programs in their own right, reside on separate host machines but all work together to form a complete application. The call one component makes to another on a separate host is a Remote Procedure Call (RPC).
Advanced Bulleted-List Menu
In today's lesson, we're going to explore using PHP to dynamically draw your site's navigation menu. Personally, I feel as though the menu is one, if not "the most" important part of a website's design. The easiest way to create a semi-decent looking menu is using the HTML tags ul (un-ordered list), and li (list item) to form a bulleted-list.
PHP: Previous and Next Links
I read several PHP forums on a daily basis. One of the most common requests I see is "How do I add previous and next links to my pages?". Hence this tutorial. When we get done here, you should be able to add previous and next links to your pages that you show database results with.
Using Multiple Pages for Navigation
After reading notepad's tutorial, Multiple pages of data from a text file, I felt compelled to complete a sister piece, Using Multiple Pages for Navigation, for Codewalkers. notepad's code is a really nice script, and it works perfectly in conjunction with Matt's "Creating a News System with PHP."
Adding Drop Shadows with PHP
This tutorial will teach you how you can add drop shadows dynamically to your images using PHP's GD image processing functions.
Adding Mail with Exim
In this tutorial I will show my basic installation and configuration of Exim as a Sendmail substitute to provide PHP with mail capabilities.
An intro to using the GD image library with PHP
Before we really get into things, let me clue you into something. I am not a graphic designer. I have no urge to be and have no talent to be. To put it bluntly, my graphics suck. Also, to use what you learn in this tutorial, you will need PHP 4.0.6 or higher and atleast GD 2.0.1...
Configuration File Processing with PHP
In this tutorial I'll take a brief look at how to read in two common types of configuration files and parse them into arrays so that they can be used by the program…
Controlling PHP
In this tutorial I'll briefly tour some ways in which PHP's configuration options can be set. Note that not all options can be set by each method. For more information on which options can be set where, read the PHP documentation.
Creating a Mail Form with PHP and Flash
In this tutorial we are going to show you how to create a contact form within flash and send it using PHP.
Creating a News System with PHP-Part 1
So, you want to display news on your site? Think it'd be pretty cool to have a page where you can enter something each day and then the whole world gets to see it? Well, I'm here to tell you how in this first installment of "Creating a News System"…
Creating a Search Application
In this tutorial, we will discuss a method of searching web pages for keywords. We will provide methods for exact keyword matching and a type of fuzzy search. Fuzzy searching enables us to find words that are similar to the keyword we searched for. This is extremely useful when the search...
Creating an Image Gallery
The goal of this tutorial is to give the reader an idea of how to construct a basic/dynamic image gallery from start to finish, not to imply that this is the only way, or even the best way to build a gallery; just a simple approach without all the bells and whistles. at the time of writing, this tutorial assumes a version of PHP >= 4.3 and GD 2...
Dynamic CSS with PHP
When I first saw an article illustrating PHP style sheets I laughed to myself. I'm not sure why the idea struck me as odd... after all, PHP has been used to generate all sorts of dynamic documents such as images, PDFs and spreadsheets. PHP is certainly not limited to generating HTML output...
Mini-Chat Tutorial
First thing to ask is what is chatting? So what do I need to Code? Basicly, a chat is a set of messages posted by someone, and in the order they've been posted. So we can write a first form, having two fields 'login' and 'message'. Then, we have to append it to a file, or better, a database...
Overlapping Images with GD
In this tutorial, I will demonstrate how to place an image over another image which may come in handy for many uses including, but not limited to: applying a signature or logo to a photo, adding a "watermark", placing an object onto a background or whatever else you might image useful.
PHP Debugging Tutorial
You probably feel like banging holes in your desk with your coffee mugs some mornings after spending a decent few hours just to find that you forgot a silly semi-colon or closing brace.
PHP Output Buffering
This tutorial will procede first by enumerating the functions used in output buffering with a brief explanation of each. Then we will examine how these functions are utililized. We will conclude with three brief examples of scenerios where one might use output buffering. Without further ado then, we will procede to...
RSS Parsing using Pear
This tutorial will show you how to use Pear (PHP Extension and Application Repository) to parse an RSS feed and display it on your site.
Writing a Basic Authentication System in PHP
Occasionally a site administrator will want to make certain material available online, but also have it accessible to only a select few. Some examples of this might be student records, personalized information, email and even personal photo albums…
Using Sockets in PHP
Sockets are a method in which PHP can connect to another server over the Internet and networks. The basic function to open a socket to a server is fsockopen(). You may be wondering why you would want to connect to another server? If you need to obtain information from a 3rd party server then sockets are for you.
Virtual Domains
I make these tutorials to help you along. Use these at your own risk. I will not be responsible if you break something.
Sending SMS Thru HTTP
This tutorial will teach you how to send SMS using GET and POST HTTP methods in PHP (since it's the language I know)...
Smarty for Beginners
With this tutorial I aim to explain how to use the Smarty Template Engine in the simplest terms so even beginning coders of PHP can understand how to use it as their primary template engine.
Writing a Template System in PHP
Templating is an easy way to create large sites without much hassle in maintaining a consistent look and feel across them. A standalone template file contains the HTML framework of the page and placeholders. A script can take the template file and replace the placeholders with the appropriate content to produce the final page.
A Tour of Decision Making Structures in PHP
Often times, people find it difficult to make a decision--we're often asking ourselves questions like, "What pair of pants should I wear to work?", "Should I really eat that extra donut?" and "Should I tell my fiancee I wear a toupee?"…
An Overview of Arrays in PHP
The PHP Manual defines an array in PHP as an ordered map. Personally, I don't like this definition. I will define an array in PHP as a collection of variables, which I think is a little more descriptive…
Beginning Object Oriented Programming in PHP
Object-Oriented Programming (OOP) tutorials are generally bogged down with programming theory and large metaphysical words such as encapsulation, inheritance and abstraction. They attempt to explain things by comparing code samples to microwaves or automobiles, which only serves to confuse the reader more...
Reading Directorys with PHP
In this tutorial I'm going to show you how to create a directory reading system. A directory reading sytem will display all the contents of the specified directory automatically w/o you having to change your index file.
Server Statistics
We will start with showing the average server load and server uptime in days. Most of this can be done with the exec() function. Basically, we will be sending the server the uptime command which will then return the information we need to form our basic server stats script...
Numbered Code Highlighter
This will hightlight the php code and number each line. This can be initiated in many different ways.
Users Online
Shows the amount of users online at a time…
Random Image Generator
This function will select a random image from a given directory…
Random String
This tutorial will show you to generate a compelelty random string…
[PHP] Tags
Here is a function that let you use [PHP] tags in a string, like you would use in vB. It will higlight all the code within the tags. It also checks weather to add the opening and closing tags.
Checking Variables
Here is the proper way to take action accoriding to weather a variable is set or not…
Add '...' to end of a string
This code will append '...' to a string if its greater than $Length. Just set that variable and $Str and your set.
Rotating Banner
This is a snippet that will rotate a banner on a page. All you have to do is set $File and $Images to the paths to the images. It will just do the next image in $Images in order. It doesn't rotate banners for seperate users, it just goes through. Before you use it, create the $Stat file and set the contents of it to 0 and your ready to go!
.htaccess Password Protection
This tutorial will help you learn how to password protect your file quickly and easily in a few lines of code.
AOL IM Check User Online
Learn to see see if a user is currently online on AOL Instant Messenger using PHP. The tutorial uses PHP functions including sockets, files, and strings.
AOL AIM Profile Viewer
This tutorial will show you how to make a script to see who has seen your AOL Instant Messenger profile. You can see the final code at view.txt…
Browser Redirect
Learn how to do a Browser Redirect using the power of PHP.
Browser-Dependent Stylesheets
Learn how to make a Browser-Dependent Stylesheets using PHP.
Classes
Learn Advanced Object Oriented Programming for PHP…
Counter
Learn how to make a text counter in PHP…
Directory List
Learn how to make a directory list in PHP…
Errors and How to Fix Them
This tutorial will briefly describe some of the common errors in PHP.
Image Databasing
This tutorial teaches you how to upload images into a mysql database using PHP. Even though it sounds complicated, it is fairly simple and has many practical applications. One example of an application would be Forum User Images…
Intro to PHP
An intro to the world of PHP…
Last Modified
Learn how to check when the file was last modified using power of PHP…
Next-Previous Links
This tutorial will show you how to make next previous links for a mySQL database.
Object Oriented Programming With PHP 4.1.x
Object Oriented Programming provides raw power to PHP 4.1.x…
Page Loading Time
Learn how to output the time a page takes to load…
Poll
This article will teach you how to write a basic poll script in php. You will mysql and a new version of PHP…
Random Quotes
Learn how to make Random Quotes using the power of PHP…
RSS Parsing using Pear
This tutorial will show you how to use Pear (PHP Extension and Application Repository) to parse an RSS feed and display it on your site.
Shoutbox
Shoutboxes have become a popular way to leave messages at a site…
Simple User Log
A simple user log can help you keep track of who's been visiting your site and where they are coming from…
Uploading a File
Learn how to add upload a file using the power of PHP.
Signup and Login
Learn how to have a user database where people can sign up and log in…
Show the Number of Users Online
This script will explain how to display the number of users online using your website. You have to put this on everypage you want it to appear. It can be broken down into 2 sections…
Working with Flat Files
Flat Files are simple text files or any other file used to store information.
PHP and Apache in Windows 2000
By the end of this tutorial, you'll hopefully have a working PHP and Apache system running on your Windows 2000 machine so that you can test those pesky PHP scripts…
Simple Classes Introduction
I hope that by the end of this tutorial, you'll have a better understadning of what classes are and what they are good for. Classes can be very powerful when used right and can save you a lot of work (and typing) in the long run. The PHP manual defines classes as "a collection of variables and functions working together with these variables."
A Short Intro to GD
In the following tutorial I'll show you a peek at the power of coupling GD with PHP to create a basic button. The GD extension is more or less an addon for PHP to allow for image manipulation and creation and has to be compiled in when you compile PHP and the rest of the software.
Sample script with PHP-CGI
Well, as a follow-up to our PHPCGI tutorial that showed you how to install the PHP files as a CGI program on your server, we wanted to get a bit more into some of the details of using it and running scripts automatically with it. Once again, we're going to assume that it's a UNIX-based operating system you're working on. This is much easier to get working than a Windows based machine (well, for me anyway) and cron just does such a good job, we're going to stick with it...
How to protect images without htaccess using PHP
On numerous occassions I have been asked how to serve images from a non-web accessible directory. A lot of sites now a days sell content and with the latest in php technologies like sessions and such, people like to use session management and authentication on their websites, without using .htaccess files in their directory...
Addons/Plugins for Your PHP Code
I noted in my previous column "Public PHP Code" about creating Addons/Plugins to make your PHP Application more flexible. So for this column should be viewed more as a "How To" on creating Addons/Plugins for your PHP applications…
Site Stats
Have a little site stats on the side, with unique hits and hits. Also make a list that shows you all the visitors IP addresses and how many times they have visited your site.
Secure File Upload Script
Make a secure file upload script that makes sure that the uploaded file is valid type, and that it is smaller than the max value.
Make a CMS from Scratch
Learn how to make an easy to manage and edit Content Management System (CMS) from scratch! Using PHP and MySQL, and .inc files for easy updating.
Making a "Forgot your Password?"
Learn how to make a simple form that selects a user's login details and email it to them depending on the address that they supply!
PHP User Stats
In this tutorial I am going to teach you how to make a User Stats menu in PHP and MySQL which displays…
PHP News CMS Part 2
This Tutorial is a continuation of our PHP News CMS Tutorial. If you have not yet taken the first part of this tutorial, please go take it now. In part one of this tutorial, you learned how to setup a working CMS that allows you to add news or other content to your website. But what do we do if we need to go back and edit or delete one of our posts? This part of the tutorial will show you how to edit and delete previous entries.
Output Buffering
Output buffering is a nice little trick to prevent errors when using functions like header(), setcookie() and session_start(). The concept behind it is basicly to put output in the buffer until all of the PHP has been parsed. It allows you to modify the page header anytime.
Regular Expressions
Regular expressions provide a means for advanced string matching and manipulation. They are very often not a pretty thing to look at. For instance...
PHP Archive System
Using PHP, we are able to creat archives out of data we can query from our database. There are a few types of code we will need to do this. Create a new document, and call it newsarchive.php. Inside it, insert the following code…
PHP IP Tutorial
We will be showing you how to show the users IP address, Start off by creating a new document in a text editor and enter this code...
PHP Email
Create a new document in your favorite text editor, then add the following code…
A simple text counter on your site
This example is very basic and far from ideal if you want an accurate count of your visitors because if you press refresh your counter will always increment by 1. This example does show some useful techniques such as opening and closing files …
Random Image Script
This is a simple random image script which is ideal for displaying basic images from a text file . In future examples we will expand on this and build some simple banner rotation systems.
Remotely hosted scripts
OK you have a set of affiliate links but damn you havesites that do not allow PHP for example free hosts or you wish to create a simple scheme where links or content is displayed on other peoples sites . How do you do this , well with a bit of JavaScript and PHP...
PHP Other Tutorial - Thescripts - What is PHP? Intro
PHP is a server-side, cross-platform, HTML embedded scripting language. If you are familiar with Cold Fusion (CFM) or Active Server Pages (ASP), then you should understand what this means, as it goes along those lines.
Escaping PHP
Ever wondered how to do complex and abstract or non-PHP functions based on simple PHP parsing? This tutorial will give you a very brief glimpse on how to do that.
Introduction to regular expressions (#2): ERE POSIX
This tutorial will continue where tutorial '(#1): General Mechanics' left off, and will dive into the world of ereg.
Introduction to Output Buffering
If you want to have more control over your scripts, the output buffering functions are the way to go. Anything from error handling to multiple header() commands in a single document. Not only does output buffering offer a powerful API for handling content, you can also compress data before it's sent to the browser.
Introduction to regular expressions (#1): General Mechanics
Anyone that has to do a large sum of unusual data manipulation will always choose to use regular expressions ('regex') over native functions because of one thing: power. In PHP the 'ereg_' functions are what utilize ERE POSIX, and the 'preg_' functions utilize PCRE. In this 'introduction to regular expressions' I will assume no prior knowledge of regex, and will try to give you the most thorough explanation of this powerful tool as I can.
An Introduction to Arrays
This is my secont installment to the "Introduction to" series. This will try to give you the basic information you need to begin writing scripts that take advantage of arrays. Happy Hunting.
An Introduction to Variables
An Introduction to Variables…
PHP Calendar Tutorial
In this tutorial, we're going to create a calendar using PHP. There may be simpler ways of creating a calendar than the examples in this tutorial, but that's ok because we're going to practice using some advanced arrays, date/time functions and work on utilizing some other features of PHP that you may not be familiar with.
Fork PHP!
Sometimes with PHP, you just gotta fork. What is forking? It's the act of sending a process to the background and forgetting about it. I know some of you may be disappointed now that you know what forking really is << grin >>.
Automate Your PHP Site Using CRON
Automating your website can really help yourself out when you have tasks that require updates and specific intervals. During the course of this tutorial, I'll show you how to setup a CRON that works well with PHP. I'll show you two methods of using CRONs for PHP that allow you to run with or without the CGI version of PHP. Let's begin.
Building a Counter
This tutorial will help you build and understand how a counter that only counts unique visitors works.
Logging Your Website With PHP Using a Flat File
Learn how to write your own Log Files using PHP. A great introduction for writing to files, using sessions and PHP Predefined Variables!
Complete PHP Mail Tutorial: Everything You Need to Know
Learn how to use PHP Mailer and send e-mail with PHP the easy way!
Writing A File Upload Class
Teach yourself how to write a file upload class that will not only upload, but validate file extensions, sizes, users, and much more. Make your life easier!
Graphing with PHP and MRTG
Learn how to put Multi Router Traffic Grapher (MRTG) to use by graphing PHP output!
Introduction to JPGraph (Part II)
In this Part II tutorial we will be dealing with creating pie charts.
Introduction to JPGraph (Part I)
Are you interested in creating graphs, pie charts etc. and make your site lively. Go ahead and read this tutorial.
GD Library
If you are interested in creating images at runtime using PHP then this is the tutorial for you.
Interactive Membership with User Image Upload Capability (follow-up on Membership 2.0)
Followed along with the Membership 2.0 Tutorial, and wondering how to let users modify their settings? Want to know how to let your users upload a photo of themselves? This is the tutorial for you.
PHP Membership System
A complete membership system, with separate areas for information postings by approved individuals, a newsletter section which shows the information, and more. This uses a MySQL front-end for database use. This tutorial assumes that you have a basic knowledge of PHP and MySQL, or at the very minimum, a working knowledge of web languages and programming logic.
Making Expanding and Collapsing Menus
If you want a menu that can expand or collapse when a user clicks on it, this tutorial will show you how to accomplish it.
SSH with PHP 4
Learn how to use SSH with PHP 4 and execute commands on remote servers!
Advanced Error Handling: Writing an Error Handling Class
If you're tired of the default error handler and want to have complete control over default error messages, you should write your own error handling class. Writing your own handler will enable you to change the way php handles your error messages, and allows you to create your own error types. With this class you will be able to send error messages to a log file, or send error reports via email.
Pagination: Easy as PREV 1 2 3 NEXT
This tutorial shows you how to make those nifty little PREV 1 2 3 NEXT, thing-a-ma-jiggers. If you want to apply pagination to some of your queries, check this out!
Overriding the php.ini with no access!
Sometimes not having the power of a System Administrator can be a drag, especially if it's on the hosted server where your website lives. This tutorial will help show you how to set some of those php.ini values without going through your system admin.
PHP And XML Introduction
Introduction to using XML in PHP…
MySQL Full-Text Searching with PHP
Learn how to enable MySQL Full-Text searches for an improved method to search your webssites!
An Introduction to Mcrypt and PHP
An Introduction to Mcrypt and PHP - Learn how to encrypt and decrypt sensitive information using PHP and Mcrypt!
Security in PHP
Security is becoming a growingly important subject in every webmasters life, As more hackers join the lines of trying to break into our scripts, we must constantly study Security to protect our selves against these Hackers. This tutorial will show many of the ways hackers use to get into your scripts.
Hide Your PHP For Security
Wanting to know how to hide your PHP on your website? This tutorial will show you how to use other file extensions to parse with the PHP Engine and hide potentially vulnerable information about your web server.
Static HTML Generation With PHP
Want to reduce the load that MySQL has on your web server? Generating Static HTML pages to replace queries is the solution. Learn how.
Theme Your Website Once and Forever!
Learn how to create a site-wide template for your php driven website. This allows you to "Theme" your website and save yourself a lot of time.
Protecting PHP Scripts with HTTP Authorization
Protect your PHP Scripts using the most efficient method: HTTP Authorization, as implemented in PHP. Using this tutorial, you'll learn how easy it is.
Planning PHP Projects
Designing Code…
Introduction to HTTP Response Splitting
In this article about web server / PHP Security, you can learn about HTTP Response Splitting and how to avoid the vulnerabilities with it.
Making a phpBB-style Editor - Part 2: The Processing
This tutorial is for all those looking to achieve a bb-style editor for their users. This part (part 2) covers the backend (PHP, preview mechanism). FOREWARNING - it lacks some of the functionality of the actual phpBB editor.
Writing A Language Filter
Teach yourself how to edit obscenities from your user submitted input.
Creating and Using a Timing Class
The purpose of this tutorial is to cover two seperate topics; profiling and object oriented programming (OOP). In this tutorial we'll create a simple class that can be used to create one or more timers. You can then use these timers to show you how long a script, function or code block takes to run, which can help you optimize your scripts...
Making a phpBB-style Editor - Part 1: The Editor
This tutorial is for all those looking to achieve a bb-style editor for their users. This part (part 1) covers the javascript and form behind the editor itself (none of the processing). FOREWARNING - it lacks some of the functionality of the actual phpBB editor.
Message Abstraction
This tutorial will show you how to create a simple to use, yet very efficient message layer that will be used to easily report errors and information to your users.
Creating a simple forum
This will help you starting make your own forum, it includes the most used things as add, delete & post.
GD Library
If you are intrested in creating images at runtime using PHP then this is the tutorial for you.
Using PHP-CLI (Command Line Interface)
Learn how to use PHP on the command line.
PHP.INI Setup!!
Learn how to setup your php.ini file for configuring PHP!
Writing your own template class (Part 1)
Learn how to write your own template class in PHP.
Protection from offline viewers
A simple method of protecting your website from offline downloaders (aka web rippers). Also a good introduction to banning IPs.
P and J Programming 101: Sequencing and Dependencies
Learn the basics of PHP programming…
Randomize Images, Quotes and MySQL Results
Learn how to randomize just about anything you need on your website. Great for Random Quotes, Images and MySQL Results.
Processing Payments With CURL
Learn how to make your credit card payment gateway processing transparent to the user using CURL and PHP. These methods will make your website and business appear very professional.
Introduction to Sockets
Learn how to use PHP sockets to interact remotely and create daemons.
Random Title Generator using Arrays
Have you always wanted to have your own randomly generated titles like some big websites do?? Here is your chance..
PHP Coding Standard
Learn how to apply your programing to a standard with PHP.
Automating news display with PHP scripts
This tutorial will teach you how to build a news script for your website, giving you a break from uploading files every time there's news.
Custom Error 404 Documents with PHP
Want to direct all of your Error 404 Not Found errors to your website index instead of displaying that plain and unlpleasant looking Error page? Read this tutorial and we'll show you exactly how!
Introduction to PHP Classes (OOP)
Learn how to use PHP Classes for Object Oriented Programming…
Build an Online 5 Star Rating System!
Create a 5 out of 5 star rating system with this tutorial. Also a great excercise in using if else statements.
Introduction to PHP-GTK
This 'tutorial' will try to give you an explanation as to what exactly php-gtk is, a little history, and an idea of some practical uses. If you have ever heard the term GUI or widget and wondered what the fuss was about, this introduction to php-gtk is for you. If you are wanting to jump into php-gtk code, you won't find it in this 'tutorial'. Read on, its time for you and me to get some background information before we start having real fun.
Array_Search!
This simple code will teach you how to use the simple function, array_search…
Build Select Boxes from arrays
The buildSelect()function takes two arguments (one for the list, and one for options) and builds a selectbox for your form. The first array is simply the list you want to display. There are several examples within the script, so syntax shouldn't be a hassle.
Break a String Into an Array For Each Character
This code will take the $mystring value which is "breakmystring" in this example and format make an array value for each character.
Easy Code Highlighter With Numbers
This is just a simple 10 line code that takes a file and highlights it and numbers it…
Simple Code Highlighter
Higlight PHP Code from a document in appropriate colour…
Another Auto PHP Function LookUp
Just pass to the code file or variable to the function and it will automaticaly create a link to php's manual, for every function that matches the php ones…
Display code
A small script that display the code from a file. Adds line numbers for easy reading…
CSS Syntax Highlighter
This is some simple PHP Daeken and I scrapped together to highlight php using CSS rules defined by the user…
File Highlighting with code numbers.
This function will take a file specified and print it out with line numbers. Rather handy for showing source of files with line numbers…
CLI -- reading from STDIN
Defines STDIN for older versions of PHP, can be used for STDOUT and STDERR too, but those are hardly used…
Get user input on the command line(Cross-Platform)
Based on the code from Tim Dudorov, this will work on Windows(tm) or *n(i/u)x…
Get user input on the command line (Windows only)
There is a code to get user input on '*nix', now there is a code to do the same on Windows based systems. Put this code in a file, for example input.php and run it with 'php -f input.php'…
Page Counter
This is a class which can manage the counts for any page or unique identifier passed to it…
Nice and simple click counter
The code provided is for a page, clicks.php, which when referenced retrieve the amount of clicks for banner and then update the this amount and store it back in the database before sending the user along to the actual link. The db is also pretty simple, with a unique "bannerID", description text, URL, clicks count and timestamp. You could use something like this to link to clicks.php...
Unique/Total Hits Counter (Using SQL)
Counter that you can use to count unique AND total hits on your site. You can also see how much each user/IP has viewed your site…
Hit counter
This counter logs ips of ppl that hit your site, and unlike alot of similar counters it checks if the ip is already listed and skips re-adding it to keep filesize down.. Was a must do for me just fixed it…
Unique IP Hit Counter
The name says it all but it counts the hits to your site. counting a ip only 1 time i find this verry useful :)…
Array to Object
This function turns an array into an object…
HTML to Excel
With a simple header call, you can turn your html tables into Excel documents. This is useful when downloading reports…
RGB color to Hue/Sat/Brightness Conversion (and back)…
Converts a given RGB color (0-255 in each channel) to its equivalent Hue/Sat/Bri values.
duration()
duration(time) returns a string which is converted from the specified time from the functions parameter…
Panel Group
This is a class that lets you group contents into panels and then open/close those panels. This is an ideal situation when your web page is out of space and you need to add more contents to it.
HTpasswd Generator
Generates an htpasswd for htaccess files…
A light form of encryption and decryption (libmcrypt not needed)
You will be able to do a light sort of encryption and decryption using these encode() and decode() functions. After using encode(), remember to save the IV along with the encrypted value, so you'll be able to decrypt it later. The encrypted value and IV can be saved in a flat file, database, or passed along in the URL (and in hidden form fields too). This code is presented under the GPL and comes with no support and no warranties whatsoever. Use at your own risk.
Email Encrypt (modulus)
Do you want to encrypt your email address to prevent bots from scanning your page and sending you or your visitors spam emails? Well here is my way to go about it. What's being done is for most of the string we use an ASCII representation of the character and for every 3rd indication we put the actual letter in to confuse bots.
Encode PHP Scripts
This is a great way to display php scripts that you don't want people editing. To 'echo' it out properly, use the following script…
Credit Card Number Validation
This function takes a string of the cardnumber with no blanks, and returns true if the number validates as a creditcard number, else it returns false.
SSL Check
This code will check if a user is connected to your https:// server or a standard http:// server…
How to Generate a Unique ID for Order Tracking Numbers
This is a quick little way to generate a unique id for stuff like tracking numbers and order id's using the unix time stamp and the users ip address.
Easy To Use Text & HTML Email Class
PHP mail() class for sending text and html email. The email attachment function is not included in this version.
Hide email addresses from spam harvesters
This simple function replaces email addresses with a "despammed" link. It relies on users having JavaScript enabled, but that's probably a safe assumption in most cases…
Easy code to send HTML emails via PHP
With this code you'll be able to send html emails using php and mail(); function. it's easy more thank you think.
E-Mail Address Validator (Easy!)
This script will check if the user entered a valid e-mail address…
Function to check for valid email and domain
Checks to make sure email is valid, and also checks to see if its a valid domain name. Also checks to see if email is already existent in your db, is right amount of chars and matches a previous email.
Sending HTML email
Just a simple code to show you how to send an HTML email…
Simple Mail class
A very, very simple mail class! So simple that doesn´t justify its use anyway... it can be a open-eyes for those who want to start working with classes!
E-mail Script
It's a nice mailscript that has a fieldcheck included and it also sends the ip. Very easy to edit, for this, i've commented the whole code out so even if you are a beginning webdev its easy to edit…
Simple Spam Prevention Script
This little snippet of code helps protect your e-mail address from spammers and spam-bots.
Mail with attachments
These two functions create a form and when submitted will email a set recipient…
function for email validation (best one)
This verifies if an email address is valid or not…
Send Emails with Read Reciepts
This code will request a read reciept fromt he recipient when receving your emails…
Internal Mail System
With this code you can easily add a internal mail system to your site the varibles are easy to change…
email script
Having trouble uploading this script…
Email Validation - checks ALL top level domains
This code will validate an email address against format, and all of the top level domains in the domain name space at this time. However, the domain name space DOES change, and more top level domains could be added in the future. The usage of this code is simple...
MAIL THROUGH PHP
LEARN MAIL THROUGH PHP...
Display File Modification Date
As seen in the Manuals section of this website at the top of every page, you can display the date and time that a file was last modified...
Select Menu out of MySql
This function builds select menu out of MySql table and leaves the selected value active.
Log Hits Per Page
Plain simple script to keep track of the page hits…
Flat file User log
This script will log the users IP Address, Browser, And the date/time Accesed.
Ip logger
This code is written for php-nuke. It will long a vistors ip address into a log file. and inform the vistor that their ip is being logged.
Extract search queries from log
Script extract google queries and their targeted pages from a log file and displays the query, the target and the frequency…
PHP Status Bar Indicator with GD
This is a status bar indicator I found on php.net and expanded it a little…
GD: Image Rescale
An example would be to put this at the bottom of the function…
Image Scale calculation
You can choose the new Width, or new Height but not both (if you're going by Height, put a -1 for new Width…
escapeshellcmd example
This function prevents users from submitting harmful code into your forms when you are running actual shell commands.
Redirecting the Web Browser with PHP
This is an immediate redirection with PHP. It will redirect the web browser to…
Displaying Your PHP Information
This function displays all of the information avaliable about your PHP installation on your server.
Move the Decimal of a Number
This function is intended to move the decimal point of a specified number any number of places to the left or right.
Move the Decimal of a Number - An Alternate Way
This is an alternate way to move the decimal point of a number using the pow() function.
greatest common divisor
This functions uses the Euclidean Algorithm to determine the greatest common divisor of two integers, and returns it as an integer. Can handle negative integers, but doesn't perform the steps properly and will result in a negative GCD. Use abs() if you want a positive GCD.
Surface Area and Volume of a Cone
An Object-Oriented script to find the surface area and volume of a cone…
Prime number generator
Its a simple prime number generator. The purpose of my prime number generator is not to be fast, its to be simple. It is possible to generate primes much faster using other ways .
Great Circle Distance Function
This function will allow you to find the closest distance between any 2 points on Earth by just submitting the DECIMAL co-ordinates.
Counting Characters
This code example shows you how to count characters in a string, form, or just whatever you need to count characters in. The usage example below isn't very good, but there IS a lot of neat things you can do with the strlen(); function.
Emoticon Making
This is a code example on how to turn text into emoticons…
nested categories
Gives the ability to work with nested caegories with only one query to the database ....
Odd or Even
Let's assume you have an array you want to present on a web page in a table. Hard to read right? What you really want is to differentiate the odd and even rows and this is how (of course you have to make a td.odd and td.even in your CSS).
Cheap-O Browser Sniffer
Designed specifically to detect MSIE (Internet Explorer) and to serve specialized "broken" pages up to MSIE only and serve your regular pages to everyone else…
Detecting HTTPS
Use PHP to detect if your connection is secure…
Intelligent Referer Display: FIXED
To view a full description view the other quickcode submission…
Dynamic CSS PHP Scrip
Change the color and CSS style of your site with PHP. Requires knowledge of CSS and PHP to be utilised fully…
include layout
You can make a lay-out page and just put this code where you want the content to be and the content will be the only thing that will chnage…
Alphabet with links
This code will list the alphabet on your page with links associated with each letter of the alphabet. Instead of using an array to store the alphabet, it uses the ASCII values for each of the upper case letters…
custom colors
Allows users to changed site's colors. Just make 2 .CSS files. Each different.
randomly tinted transparent aterm
pops up a transparent aterm window with a random tint to the background. Customize it to easily to suit your prefered term or even use it to set random term background images…
PHP File Security for Includes
File security is much better when it comes to php, this is a script that'll stop your files being directly accessed...
Retrieve ID from query string or form input
Fixed version of Integral's quickcode, with slight modifications.
Get Searchwords from Goolge Referer Querystring
This will return the search words used to find your site in the Google search engine. May need some modifications.
Hide the ugly face !
There was one error i did. I wrote a pure php page (no html tags at the start). And one day it so happened that the server had a problem with php and...boom i had all my codes as naked as i would be in my bath…
Retrieving ID from Query String Non Register Globals
For use with a database query. Is independent of POST or GET method because it makes use of the $_REQUEST super-global…
Table Generator
This code will dynamically generate a table when passed a query result and a "Headers" array…
State Abbreviate
This function will take a state name passed to the function and find the abbreviation, a great function to use to save room in your database…
Cell Mouseover
Create an effect in your menu, where, when the visitor passes the mouse on the cell, she changes of color.
Socket Abstraction Layer v3
This class will allow you to abstract sockets over a simple API…
Daeken
This class allows you to easily style your PHP-GTK widgets. The CreateStyles function uses most of the functions in the class, you can gain a better understanding by reading this function.
Force HTTPS location
If anyone tries to access any part of your site you want to make sure they do it securely. put this AT THE TOP of your script…
Sniff a Client Browser and OS
This is a class which will detect what browser the client is using and what operating system. It will not detect all of them, but this can easily be edited to add new os/browsers. Keep it free…
Socket Abstraction Class
This class will allow you to abstract sockets over a simple API.
Ban range of IPs rather than just one
With this simple script you can ban a range of ips instead of just 1 or two at a time. Simply edit the array range.
Check if string is nummeric ip
Checks if a string is a valid nummeric ip, not a valid internet ip…
IP Banning
ipi banlamak icin…
Site Check
Well it is a good script . I didn't write it and I don't know who wrote it but I posted it. It is for checking whether or not a certain site is down or online…
Server Status Script
This simple PHP script will attempt to connect to port 80 on a server and if port 80 is unresponsive the script will send out an e-mail to a specified e-mail address.
IP Ban Script
This code will provide a quick and easy way of banning any IP address from viewing your website while always logging both allowed and denied visits to user defined logs (standard .txt files).
Server and Services Status Checker
The function scanport() will scan the server for an open port. This way you can make a "Server Status" page.
Modified IP Ban
A *very* basic IP checker for people who don't care about dealing with such madness as reserved IP ranges and whatnot. Simply include it into all of the scripts you want to protect and be done with it.
Ban IP address from page
Simply add this to any page that you wish that you want to block that ip address from. It will echo "Site Down" to the user who's ip address is banned. This comes in helpful if you want to trick the user into thinking the site is up, but just down. Simply put (or the name of what name your file would be in any page that you wish to block that ip.
Validate IP Address with PHP #2
checks if the arg is a valid ip…
validate IP then redirect
This code checks the IP address fo a range of IP start digit for example it will allow only IPs start with 213 to enter the site and redirect other IPs to another page!
validate IP then redirect
this code checks the IP address fo a range of IP start digit for example it will allow only IPs start with 213 to enter the site and redirect other IPs to another page…
Validate IP Address with PHP
Simply call: valide_ip($ip); And return the results as a variable. Perform your checks with the variable like the example included.
easy and good naviagtor
you can use this navigator to make it easy to read a big number of retrieved records from you database..it is easy and good, and all you need is to blug it in your code and call it from where ever you like inside your code..it takes 2 parameters, the SELECT tage unique id and the query that by which you want to retrieve your data...
php Navigation
Put the code where you would like to display the content. Then when you have links you can use…
A script for pullin Navigaton from a data base
This pulls the data from a table sub in ure own stuff for EandB etc and table names etc. Then lets u have a field in the table decide which links are shown and lets u decide which table to choose 2. I have found it very useful and felt i neede to give somthing back to this great WEB SITE!!!
setting a "back" link
This code will set a variable called $referer which contains the name of the previous page, so that you can provide the user with a "back" link without using Java…
MySQL/PHP Recordset Navigation
A function that allows you to navigate through a MySQL recordset.
Dynamic Text Navigation Menu 2
NT/IIS tested, this will print a menu with the current page showing an arrow image before the non-linked menu item text. Change the values of the name/url arrays and image path.
smart menus from database
This functions get you a selected menu driven from database to use in update forms , it lets the selected value to be selected...
Querystring without a title
The code above displays the entire querystring, therefore, it has allowed me to retrieve my 'value without a title'.
Auto Hyperlink URLs and Emails
This snippet can be useful if you're creating your own mini forum or guestbook. It will automatically turn URLs and Emails into hyperlinks, so that you wont have to add the extra script to each variable... You could also use it in a news posting program or possibly if you have a links page and are too lazy to keep typing the URLs in manually ^_^ Fool around with it...make it do whatever you want.
Extract All URLs on a Page
Enter a URL and results will display all links on that URL by matching the strings 'http', 'file', and ftp. A while loop executes for each result and returns the url using printf.
Building a Dynamic Form Select Menu
This will build a dynamic form select menu for the categories listed inside your Categories table from your MySQL Database.
Ban IP Addresses from Your Website
The above code can be modified and new lines can be added to ban a certain list of IP addresses from your website.
Check Refering Server With Explode
This code will break apart the URL and seperate the http:// and whatever comes after your domain name.com so that you can use this code in multiple places without the need to constantly modify it for each URL on your site.
IP logger
Make a IP logger that when a user goes to the site, it loggs the IP in a text file.
PHP 5 Object Oriented - Member access abstraction
This bunch of classes allow to easily manipulate member's data and control the access to our site. It is based on postgresql but you can easily change some function names to fit mysql.
Easy Simple Password Protector
Need a simple protection to a file that requires a password? Here's one! Contact me if you need help!
Creating A Unique User ID
One of the first stumbling blocks new developers encounter when trying to build a shopping cart application is dealing with sessions and user ID's. Using the full date with the visitor's ip address an Id that is not only unique, but also descriptive can be generated.
No-scroll pages
By using this script you display a number of records per page (assigned to variable $limit) and the visitor can walk through the pages using the Back and Next links or jump to a page by clicking on the page number.
Self Generating Gallery
This code is used to self-generate a picture gallery with captions. All you have to do is place this file in a directory of images and it will generate the gallery. If you want captions below the images simply name your images to whatever you want to say under the image and it will display there. Otherwise it will display the filename (w/no extension).
Page Process Time
This is my first script on this site! This is a simple script that outputs (text formatted) the amount of time that the page take to load a page.
Apache log
Regular expression to match logs like cpanel and Directadmin make.
Hexidecimal Web Color
A regular expression to match a hexideciaml web color.
Visa
A regular expression to match a Visa number…
Mastercard
A regular expression to match a Mastercard number…
Discover Card
A regular expression to match a Discover Card number…
Diner's Club
A regular expression to match a diner's club credit card. Do these things really exist? I have never seen one…
American Express
Regular expression to match an American Express number…
Replace
with New Lines
This will undo the nl2br() conversion using regular expressions.
Email No Spam Content Replacer
This takes the $message string and replaces all of the e-mail addresses inside of it with [EMAIL REMOVED] for use in content on your websites. Helps reduce the SPAM bots from leaching email addresses from your site…
Random Code Generator
This simple code will instantly generate a code using letters (both uppercase and lowercase) and numbers. You can decide how many characters the code is.
Random quotes in array
Take the quotes sets in a array and show diferents per clicks…
Random text (no duplicate chars)
Yet another random text function, but, this don't duplicate letters in to the result.
Random Text State
Have you ever wanted to have your text randomly inserted in uppercase or lowercase for any specific reason? Well now you can do it with my handy function that uses moduls division to output the same result everytime! The usage of this function is quite simple just go...
Unique ID
If you need to destinguish users the best way may be to give each a unique ID. One way, very simple and working is to use the microtime() function and MD5 hash it. The time() function will not work as it returns seconds, not miliseconds. It is not uncommon for two users to enter a site, post a form etc the same second...
Random ID Strings
Works best as an include file. The functions will return a string of random characters of any specified length. You choose upper&lowercase letters and numbers, numbers only, upper&lowercase letters only, or lowercase letters only…
Better Random Avatar or Signature
This code will select an image from a specified directory and display it in raw form. It can be called via html image tags too.
Temporary Password Creator
This function will create a temporary password at the length you specify.
Random Picture Display
This code will display a picture at random from the specified directory…
Randon Number
Randon Number generation using simple php function. Generates a 8 digit ramdon number…
Megapunk - Random Password Generator
This is a random password generator…
Random Quotes
This code get the quotes from the 'quotes.txt' file, at the end of a line you need to put the '|' ascii code.
Random Include Files With PHP
This code will randomly include an html file into your php script…
Get the ID of Last MySQL Entry
This takes the last transaction and gets the primary key auto_increment value for that row. Very useful.
Pattern based Password Generator
This password generator allows you to generate passwords from a password pattern. The function is…
Random Password/Code
Creates a random password/code with 10 caractheres…
Beefy Random Password Creation
This will allow you to generate a random password of an arbitrary length, using uppercase, lowercase, numbers, special and characters (or any combination of those)…
Easy to remember password for the membership tutorials
This code will create an easy to remember random password. This code replaces the current randompassword() functions in the membership tutorial.
Pagination Class
This is a class which can be used to perform pagination calculations. With it you can define the total results, the current page, the total results per page, the total pages, the current page result start, and the current page result end.
Pagination
Create FIRST PREV NEXT LAST page naviation using PHP and draw information from mysql database. Works great. Can be adapted to any search script using the GET method and the $queryString variable.
Previous and Next Page Links With PHP and MySQL
While typing your HTML for a page that is stored in your MySQL database, you can simply type in…
Multiple Pages Using PHP and MySQL
This is yet another snippet from an oekaki board I helped program. It lets you specify the number of results per page and displays the page numbers. This is very usful for things like guestbooks, forums, or if you just want to keep things organized.
Create Next and Previous Pages for Search Results
See the comments in the code above. This creates Next and Previous page hyperlinks for your search results…
Invert Case of a string
This will invert the case of a string, so uppercase to lowercase…
str_split_index()
This function can be used to split a string into two parts by providing it the index that the split should occur.
Template Class
Opens a file for a template, then replaces specified content in an array, and it can either print it to a static page, or you can use the "echo" command to print it dynamically.
Correct string endings
Ever see those annoying sentences that have incorrect grammar based on integer variables? Well, I always write a function to correctly display the word in question and here it is…
Numbers To Letters
This code will convert numbers to letters. I'm not sure what it can be used for but someone on this site asked me to help them, so here it is…
Return array of strings based on surrounding tags
If you ever had the need to find certain text based on what's around that string, this function will do it for you. I used this to find certain text in html files. It will return an array of the strings…
Quick String Scrambler
quick way to scramble a source string…
Easier Auto Comma Insert
This is in refrence to a post a few before this one. A php function to insert commas much more easier than the one he posted.
Numeric Currency to Alpha Word Value String
This function takes a numeric currency value - say 34.87, and converts it to a string as in Thirty Four Dollars and Eighty Seven Cents. Handles amounts up to 999 million. Handles singular and plural "dollars" and "cents". Decently documented and easy to follow.
Letters to Images
Any letter passed through this will create a img tag for the letter. Use the line below to implement.
Dynamic Text Navigation Menu
Tested on *nix server, this code displays a navigation menu which ommits the current page link from the menu. Edit the top arrays to display your menu names and urls…
Remove Images Using PHP From a String
This will remove any images and tags from your strings leaving the rest of the html in tact…
Anagrams
This function takes a string as a parameter, and returns a numbered array of the possible anagrams of the string.
String Scrambler
This code will take a string as a parameter, and return a (psuedo-)randomly scrambled string…
Formatting a Phone Number
This code was originally submitted by Uranium-235 on our forums. It takes a phone number and formats it like…
CountCodeLines
Counts the number of code lines in a project. supports multipule files in multipule directories…
Limiting A String Length
Stop strings longer that x long being entered into a database, useful for shoutboxes, forms etc.
RECENT ARTICLES from Graphic Design BloG
Do You Need to Know How to Draw or Sketch to be a Graphic Designer?
Plenty of graphic designers have gotten jobs without knowing how to draw at all. Nevertheless, learning how to draw or sketch can be invaluable for three big reasons.
![]() |
![]() |
|
![]() |
![]() |
|
Minimalist Website Design Can Now Improve Search Engine Position
A minimalist web design makes your webpage load faster, which is now one of the criteria Google uses to determine a website's search engine position.
Tips for Taking the Guesswork out of Web Design
Web design can sometimes feel a little like mind reading–clients trying to express abstract ideas about what they want, you trying to divine what they mean, all of you hoping to land on some kind of common ground. But the design process doesn?t have to be such a scary leap into the unknown.
Expert user experience [...]
Quick Ways to Bump up Your Web Design Skills
MediaBistro is offering one killer deal for anyone looking to bump up his/her web design skills. Right now you can get a year subscription to their On Demand Video library for just $97–that?s more than half off the usual price!
The On Demand Videos are a great resource for any designer, and include practical online tutorials [...]
How to Design an iPhone Application: Part 2
So the last post started you down the road to iPhone app stardom. Now let?s talk about how to execute your big idea and actually get it up and running in the iTunes store:
5. Get going on the design work.
While you?re waiting for Mac?s Software Development Kit (SDK) and Xcode files to download, work on [...]
How to Design an iPhone Application: Part 1
Earlier this week, the New York Times reported that Apple banished app developer Thuat Nguyen and all of his applications from the iTunes online store. It was a severe punishment for a prolific book app provider, but a necessary one. It seems that Nguyen was breaching user?s accounts to make purchases (of his own applications) [...]
Time-saving Tools You Shouldn?t Miss
Smashing Magazine recently posted an excellent roundup of powerful time savers for web designers–a whopping 50 of them. Funny, trolling through a list of 50 web design tools built to help you save time doesn?t seem very efficient. That?s why you can find a recap of 4 of the most helpful/innovative/time saving ones below. They?re [...]
All Web Design Resources is a Directory & Blog Full of Tools for Web Site Designers
All Web Design Resources Portal is a Web Site Design education directory with resources & articles for Graphic Designers, Web Developers, & Web Designers including a Web Design forum, blog, graphics software tips, web development resources, web programming tools, web design jobs, advice for new web designers about web design schools and education as
well as tips for freelance web design business owners, and much more.
15 Beautiful and Inspiring Nature Photographs ? Whoaa!
Need a good captcha generating php script
Removing background from images
Purdy Picture...
selling photography and illustrations as stock photos
Photo
Amatus-Grey
iMac vs Mac Pro
What Camera Do You Use?
What are some really good design schools in NC & California?
HDR photography ( High Dynamic Range)