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 ==... |
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... |
Building a Simple Monthly Calendar
Published on : 07.03.2010
Category : PHP Viewed : 16 times.
In this tutorial we are going to learn how to build a simple calendar in PHP. You have seen many of those calendar date pickers mostly in Javascript. This PHP based one has a slightly different purpose - instead of populating an input field, it outputs links for the different dates and can be used for example as a monthly archive in a dynamic DB-driven site.
We will build this calendar following good coding practices and keeping the login in one PHP file and the presentation in one... |
Displaying Records in Multiple Columns Using PHP
Published on : 07.03.2010
Category : PHP Viewed : 10 times.
For this article, i have selected a table members, containing each member's pic and some other text detail. The members will be shown in multiple columns as shown in the picture below.
The technique is to use 2 loops (one nested inside the other). The outter loop creates rows and the inner loop creates columns. The only thing we have to take care of is the inner loop creates equal number of columns for each row. If there are no more records the inner loop should print a blank column.... |
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.... |
Creating Quality Document Scans
Published on : 02.03.2010
Category : Linux Viewed : 24 times.
While we can all dream about the world of paper being replaced with computers and electronic documents, we all know that is still only a dream. In the course of doing my graduate studies, I have often needed to make copies of articles and books reserved in the library. I've grown accustom to scanning these documents and archiving them with the rest of my course work, and in the process I've learned to make high quality scans, suitable for printing if necessary, and still a ... |
Libvirt and Python
Published on : 01.03.2010
Category : Linux Viewed : 30 times.
The previous example illustrated the control of domains using the command-line utility virsh. Let's now look an example of domain control using Python. Python was the libvirt-supported scripting language and provides a clean, object-oriented interface to the libvirt API.
In this example, I explore some of the same operations that I demonstrated with the virsh utility (list, suspend, resume, and so on). The... |
Using Layers
Published on : 27.02.2010
Category : AutoCAD Viewed : 17 times.
Layers Layers are a way of managing, tidying and also controlling the visual layout of a drawing. A whole section of a drawing can be turned on or off, or simply one aspect can be controlled - text for example. This is all done by using layers within Autocad.
The concept of layers is used in other software applications, such as Paintshop... |
Android & iPhone browser wars: Intro to the WebKit
Published on : 20.02.2010
Category : MS Visual Basic Viewed : 145 times.
Introduction
Combined, the iPhone and Android platforms have more than 100,000 application titles available for download across their respective app stores. Native applications are those created with a platform's SDK, then compiled and installed to a device. These native applications provide thorough access to a device's inherent capabilities, including features like wireless networking, Bluetooth, data... |
Create a Cute Pig postcard from sketch
Published on : 14.02.2010
Category : Illustrator Viewed : 81 times.
This tutorial aims to guide you from sketchbook to screen; a “Cute Pig” drawn with pencil in just a couple of minutes translated into a vector postcard. You can send it to your girlfriend later, or print it on a cup or a bowl. Intermediate knowledge of Adobe Illustrator is advised.
Step 1: The Sketch
Open your sketch file in Illustrator by either opening it directly or opening a new document and going to File > Place. Give the layer it’s on an appropriate name and... |