simplePHP Class

simplePHP Class

GemPixelHelp Desk & ForumLike us on FacebookFollow us on twitter

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
    1. Cleans Text – Remove potentially dangerous tags
    2. Generates Clean URL – Perfect for search engines
    3. Truncates Text
    4. Validates Email – Spam Protection
    5. Validates Username
    6. Generates Random Password – Stronger Passwords
    7. Encodes Password
    8. Converts Date/Time to Time ago format – More User-Friendly
    9. Formats Date
    10. Formats Numbers
    11. Formats Price
    12. Converts BBcode to HTML – Let your users express themselves
    13. Gets File Extension
    14. Generates Thumbnail
    15. Shortens URL
      • tinyurl
    16. Unshortens URL
    17. Resize and Upload an Image
    18. Social Count New – Get number of shares or tweets with only one line of code.
  • Notification Functions
    1. Sets Notification Message & Display it to users
    2. 4 CSS Styles included (Error, Success, Notice, Warning) and can easily add a custom style.
  • Grabs Video from URL
    1. Youtube: Convert Links to Videos – Perfect for media sites
      • Can change width, height and theme
    2. Vimeo: Convert Links to Videos
      • Can change width and height
    3. Automatically replaces Youtube or Vimeo Link by a Video
  • Navigation
    1. Generates a Beautiful and Complete Pagination – Pagination Simplified
    2. CSS3 Pagination Style Included
  • Commenting System
    1. Generates Facebook Social Plugin – Allow Facebook users to easily comment
      • Can Customize Width (can also make it responsive), number of posts and theme
    2. Generates Disqus Comments System – A complete system with ratings and notifications


It is very easy to use this class. Simply include the class, instantiate it and then call the function you would like to use.
    $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 ( and tinyurl)
 - Thumbnail Generation Function Added


- 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 :)