Easy Mod_Rewrite with PHP tutorial
Published on : 10.03.2010
Category : PHP Viewed : 3 times.
I have been playing around with Apaches mod_rewrite on my other site http://www.2big2send.com and i must admit its a whole lot easier than i first thought..
Here is a quick guide for most general use:
Create a new file in your main directory (public_html for cPanel or httpdocs for plesk – not sure about other ones) called .htaccess (Dont forget the ‘.’ dot before the name – you may already have one of these file, thats ok, just edit it and follow the guide... |
Simple site stats counter
Published on : 10.03.2010
Category : PHP Viewed : 3 times.
This script is simple because it's using this flatfile thingy and it uses files as databases. That means you will take info and write it into another file so back to this tutorial. First make a file called counter.txt and change it's CHMOD to 777
<?php//User referer$referer = $_SERVER['HTTP_REFERER'];// User ip$ip = $_SERVER['REMOTE_ADDR'];//Your browser info$browser = $_SERVER['HTTP_USER_AGENT'];//Date$date = date('r'); // Theres no referer then it will be marked with -if($ref ==... |
The most simple PHP contact form
Published on : 10.03.2010
Category : PHP Viewed : 3 times.
In this tutorial, I’ll show you how to write the most basic PHP/HTML contact form script. So if you’re looking for validated forms or a fancy flash form, this tutorial isn’t for you.
Before you begin, make sure that your hosting provider supports PHP.
First, lets open Dreamweaver or your favorite text editor and start typing the following. You can copy it, but you should really type it out to get an understanding of how it is working. <html> <head>... |
Filtering Wordpress Categories Using an Undocumented Hook
Published on : 10.03.2010
Category : PHP Viewed : 3 times.
In this article, we will briefly cover Wordpress hooks and use an undocumented one in order to manipulate category listings.
After some further digging, while it is not listed on the Wordpress filter list, it appears that this “undocumented hook” is mentioned on the get_terms() function reference. So, we’ll call this a somewhat undocumented hook.
Anybody who knows me knows that I love Wordpress, if perhaps not more than any man should love a collection of code. I... |
Creating Email Templates in PHP
Published on : 07.03.2010
Category : PHP Viewed : 9 times.
The technique is simple
The template text (including variables and html tags) will be stored in database. We will create a table with 2 fields i.e name and text. Each template will be give a unique name. A sample entry is shown in the image below
A PHP script will read template text from the database, update varlues of variables and will send the email
For this tutorial, i haved created a table to store all the templates a webiste needs. See a snapshot of this table below
Every... |
Creating a Basic Template System in PHP
Published on : 07.03.2010
Category : PHP Viewed : 12 times.
After implmenting this template system in your webistes, you will achieve the following benefits
If you have a lot of pages that use the same design. If you want to make a layout change in the header, menu, footer or right section then you don't have to update numerous files. You will have to edit a single php file
You will have less vertical scrolling when typing PHP code as the whole section will be replaced by a single line of php (i.e we will use php include function to include... |
Simple PHP contact form
Published on : 07.03.2010
Category : PHP Viewed : 12 times.
In this tutorial, I’ll show you how to write the most basic PHP/HTML contact form script. So if you’re looking for validated forms or a fancy flash form, this tutorial isn’t for you.
Before you begin, make sure that your hosting provider supports PHP.
First, lets open Dreamweaver or your favorite text editor and start typing the following. You can copy it, but you should really type it out to get an understanding of how it is working. <html> <head>... |
Camera tool in Excel
Published on : 06.03.2010
Category : MS Excel Viewed : 20 times.
The Camera tool allows you to select a range of cells and literally insert a live picture into a spreadsheet. Any change to the range of cells will automatically update the image.
The Camera tool allows you to select a range of cells and literally insert a live picture into a spreadsheet. Any change to the range of cells will automatically update the image.
In order to use the Camera tool, we must first add it to the Command Bar. There is a well documented tutorial on... |
Some Linux admin commands everyone must know
Published on : 02.03.2010
Category : Linux Viewed : 30 times.
I assume you know how to login and logout from Linux system and one Linux system is available in your network. Since this tutorial is based on admin commands, you should have access to the system with root privilege. For connecting to Linux you need any Telnet/SSH client like PuTTY. If you don’t have one yet, download PuTTY from the following site.
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
OK, open your client, give host name/IP address and press Open button.... |
Create a KVM-based virtual server in 3 steps
Published on : 02.03.2010
Category : Linux Viewed : 47 times.
The Linux Kernel-based Virtual Machine (KVM) is free, open source virtualization software for Linux based on the Intel VT-X and AMD-V hardware virtualization extensions and a modified version of QEMU (work is underway to get the required changes upstream). KVM—in the form of kvm.ko, a loadable kernel module that provides the core virtualization infrastructure and processor-specific modules kvm-intel.ko... |