simplePHP is a simple php class that speeds up the process of creating an application by providing a set of useful functions. It comes with over 25 commonly used functions which are all very simple to use and to customize. Plus, I promise that I will keep adding functions at each update. If you have any suggestion, let me know
Live Demo of Functions
List of Functions
Basic Functions
Cleans Text – Remove potentially dangerous tags Generates Clean URL – Perfect for search engines Truncates Text Validates Email – Spam Protection Validates Username Generates Random Password – Stronger Passwords Encodes Password Converts Date/Time to Time ago format – More User-Friendly Formats Date Formats Numbers Formats Price Converts BBcode to HTML – Let your users express themselves Gets File Extension Generates Thumbnail Shortens URL goo.gl tinyurl is.gd
Unshortens URL Resize and Upload an Image Social Count New – Get number of shares or tweets with only one line of code.
Notification Functions Sets Notification Message & Display it to users 4 CSS Styles included (Error, Success, Notice, Warning) and can easily add a custom style.
Grabs Video from URL Youtube: Convert Links to Videos – Perfect for media sites Can change width, height and theme
Vimeo: Convert Links to Videos Can change width and height
Automatically replaces Youtube or Vimeo Link by a Video
Navigation Generates a Beautiful and Complete Pagination – Pagination Simplified CSS3 Pagination Style Included
Commenting System Generates Facebook Social Plugin – Allow Facebook users to easily comment Can Customize Width (can also make it responsive), number of posts and theme Generates Disqus Comments System – A complete system with ratings and notifications
Usage It is very easy to use this class. Simply include the class, instantiate it and then call the function you would like to use.
<?php require_once("General.class.php"); $example = new General; echo $example->clean("This text"); ?>
Change Log
v2.1 (17/01/2013) - - Social Count Function Added - Truncate Function Updated - Many Other Functions Improved
v2.0 (24/10/2012) - URL unshortening Function Added - Upload Function Added - Price Format Function Added - URL Shortening Function Updated - Overall Improvement
v1.1 (9/10/2012) - URL shortening function added (goo.gl and tinyurl) - Thumbnail Generation Function Added
Requirements - Latest version of PHP is strongly recommended - cURL and file_get_contents() Enabled
Documentation & Support Documentation includes lots of examples and step by step explanation. Support will be given via my support forum and/or via email. Also don’t forget to follow me and to rate this awesome class