PHP Classes is a searchable repository of PHP Classes and resources for the Object Oriented Designer and Developer. Many user graded scripts for examples and more.
Latest Class Additions
PHP Classes: Latest entries
Array2XML
Package:
Array2XML
Summary:
Generate an XML document from array data
Groups:
Data types, XML
Author:
emnu
Description:
This class can be used to generate an XML document from an array.
It can traverse a nested associative array and generate a XML document.
The array entry indexes are used to define the XML tag names. The array entry values are used to define the XML tag data.
ZMySql Simple
Package:
ZMySql Simple
Summary:
Execute simple MySQL database query
Groups:
Databases
Author:
A.K
Description:
This is a simple class to execute MySQL databases queries. It can:
- Execute a manipulation query and store the affected rows or last inserted identifier
- Execute a SELECT query to retrieve a single column value
- Execute a SELECT query to retrieve a single row as an object
- Execute a SELECT query to retrieve all columns and rows in an array
GtkMozEmbed Screenshot
Package:
GtkMozEmbed Screenshot
Summary:
Take page screenshots on Linux with Mozilla widget
Groups:
Graphics, GUI, PHP 5, Unix
Author:
Daniel Anechitoaie
Description:
This class can be used to take screenshots of Web pages using Mozilla embedded GTK widget.
It creates a graphical user interface window using PHP-GTK 2 that contains a GtkMozEmbed browser widget.
The browser gadget is pointed to a given URL and the class saves the page as to a image file in PNG format when the page stops loading.
The class works in Linux/UNIX and other platforms that support the GtkMozEmbed widget.
MySQL Structure Magic
Package:
MySQL Structure Magic
Summary:
Synchronize MySQL database schemata
Groups:
Databases, PHP 5, Systems administration
Author:
Alen Pokos
Description:
This class can be used to synchronize MySQL database schemata.
It can analyze the schema of a MySQL database and export it as a PHP array definition or in a XML format.
The class can also import previously exported schema definitions.
With an initial and final schema definitions the class can compare them and determine the necessary SQL statements to alter the initial schema to make it become the final schema.
Logger
Package:
Logger
Summary:
Filter and export data of application events
Groups:
Language, Logging, PHP 5
Author:
Marius Zadara
Description:
This package can be used to filter and export data application events.
It consists of several interfaces and classes that applications can instantiate to define which kind of events they want to handle in each specific situation.
The package can also export data to different types of event logging containers.
Replace string at any position
Package:
Replace string at any position
Summary:
Replace occurrences of a text in a string
Groups:
Text processing
Author:
ravi panwar
Description:
This is a simple class that can replace text in a given string.
It search and replace a given text in a string and replace all occurrences or only specific occurrences of the text in the string.
Grab Emails From URL
Package:
Grab Emails From URL
Summary:
Retrieve e-mail addresses from pages
Groups:
Email, PHP 5, Web services
Author:
David Ferreira
Description:
This is a simple class that can be used to retrieve e-mail addresses found in Web pages.
It validates a given page URL and then retrieves the page contents for extracting any e-mail addresses found in it.
The e-mail addresses are stored in a given text file.
Gerenciamento do windows por COM
Package:
Gerenciamento do windows por COM
Summary:
Manage users and folders on a Windows system
Groups:
PHP 5, Systems administration, Windows
Author:
Diego B. Pimentel
Description:
This class can be used to manage users and folders on a Windows system.
It uses COM objects to perform several operations on Windows system users like changing the user password, adding or removing an user, and adding an user group.
The class can also perform operations on folders like adding or removing a folder, or giving a folder full access permissions to an user.
In Portuguese:
Classe desenvolvida para criação e edição de usuários, pastas e permissões.
Rex
Package:
Rex
Summary:
Check proxy addresses and filter Javascript
Groups:
HTTP, Networking, PHP 5, Security
Author:
David Ferreira
Description:
This class can be used to check if a given IP address could be a proxy server responding in ports usually used by proxies. It can generate a log with IP addresses and the information whether it can be a proxy.
It can also check if an array of POST or GET values contains HTML excerpts with Javascript that could be used to perform XSS (Cross-site scripting) attacks.
Rex v1.1 features:
- Proxy port scan can be disabled (in some cases, it blocks users that have port 80 open in their router configuration)
- Added checkspamcop() that checks if a user IP is registered as spammer on Spamcop.net (can be enabled/diabled)
- Function filtraxss() renamed to checkxss() because it really checks the presence of malicious xss doesn't filter anything
- Function checkxss() only accepts arrays
- Added filterxss() that removes or disables tags
- Added checksize_db_data() that can be used to check for data size before inserting in database
- Added filtersql() that escapes special characters in a string for use in a SQL statement
- Portuguese variables renamed to english for better understanding the code to a larger community
Website Cache
Package:
Website Cache
Summary:
Retrieve site pages and store in cache files
Groups:
Cache, Files and Folders, HTTP
Author:
William Lang
Description:
This class can be used to retrieve pages from a site and store them in static cache files.
It can retrieve the contents of a given remote Web page and store it in a cache file.
The class can check if a cache file for a page exists and it was updated no later than a given expiry time to avoid retrieving the page again.