WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : The simple counter with use MySql and gd.
Categories : MySQL, HTTP, Graphics, PHP, Databases Update Picture
Andrey Korlyakov
Date : Feb 20th 1999
Grade : 3 of 5 (graded 3 times)
Viewed : 13656
File : count.php
Images : No Images for this code example.
Search : More code by Andrey Korlyakov
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

It is the simple counter with registration of visitings and
users agent - Internet Explorer(green),Netscape(blue) and Other(Red).
INSTALL:
1. Create the necessary tables. See below.
2. Create in MySql user counter,pass counter with access to these tables.
3. Save code in file count.php3
4. Add string <img src="http://your.host/count.php3"> where you want to put
the counter.

Note 1
array $exception contains ip-addresses from which visiting do not count.
Note 2
If you have one page with different names like
Id URL
4 http://www.some.com/
12 http://www.some.com/index.html
Choose Id from the table counter and change them in the table eq.
WAS: Id Id1
4 4
12 12
make: update eq set Id=4 where Id1=12;
Became:Id Id1
4 4
4 12
==== CREATE TABLE ========
Make this command in mysql
create database count;
use count;
create table agents (
Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
agent VARCHAR(255) NOT NULL,
type ENUM("IE","Netscape","Other"),
counts INT NOT NULL DEFAULT 0,
last TIMESTAMP,
open TIMESTAMP,
KEY (Id),
INDEX (agent(64)),
UNIQUE (agent)
);
create table counters (
Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
URL VARCHAR(255) NOT NULL,
counts INT UNSIGNED NOT NULL DEFAULT 0,
IE INT UNSIGNED NOT NULL DEFAULT 0,
Netscape INT UNSIGNED NOT NULL DEFAULT 0,
Other INT UNSIGNED NOT NULL DEFAULT 0,
last TIMESTAMP,
open TIMESTAMP,
KEY (Id),
INDEX (URL(64)),
UNIQUE (URL)
);
create table eq (
id SMALLINT,
id1 SMALLINT
);

========CODE ============
See Attach File




Identify and log search engine access (spiders, robots, etc.) to a page.
Categories : HTTP, Environment Variables, PHP, MySQL, Databases
A simple script to count and report hits and the last modification time of an HTML page. Requires MySQL support (other DBs should work too, except possibly mSQL).
Categories : HTTP, MySQL, PHP, Databases
Loading Images to/from MySQL
Categories : Databases, MySQL, PHP, Graphics
Functions for loading images into a MySQL database and displaying them.
Categories : Graphics, HTML and PHP, MySQL, PHP, Databases
Creating thumbnails from MySQL Blobs online
Categories : PHP, MySQL, Graphics, HTML and PHP, Databases
bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager
Categories : MySQL, PHP, MySQL, Complete Programs, Databases
Inserting data to a MySQL Database using AJAX
Categories : AJAX, HTTP, PHP, Databases, MySQL
Simple pipe delimited file export program that downloads to a local machine
Categories : PHP, Filesystem, Databases, MySQL, HTTP
This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server.
Categories : Databases, MySQL, Complete Programs, PHP, Databases
MyOrgBook - Online Organizer written in PHP & MySql. Includes online contacts, todo, calendar, update, delete, insert, multi-user interface.
Categories : PHP, MySQL, Calendar, PDAs and Organizers, Databases
Simple usersOnline class - keep track of how many users are online on your site
Categories : PHP, PHP Classes, Databases, MySQL
MySQL Web Interface
Categories : MySQL, Databases, PHP
A PHP useradmin for MySQL. Uploading is easy. The only thing you need is PHP and MySQL installed!
Categories : MySQL, Databases, PHP, HTML and PHP
PostGreSQL and MySQL 2 in 1 db Manager
Categories : PHP, PHP Classes, Databases, PostgreSQL, MySQL
Simple PHP/3 Access Counter (using GD and DBM functions)
Categories : Databases, PHP, Graphics, HTML and PHP, dBase