Snipplicious / PHP is a gallery of FREE PHP code snippets of various complexity. These snippets can be easily copied and pasted into and will work just out of the box!

Search snippets

Browse by tags

Strings Date&Time SEO Colors Files
Or browse

PHP function to generate random password of a given length and from given characters

Thumbnail of Password generator Password generator

Simple php function that converts any string to SEO URL safe string with the dash separator.

Thumbnail of SEO String SEO String

Compute how many days/weeks/years ago is given timestamp ago from current date. As you can see on facebook for example like "2 days ago"

Thumbnail of Time ago Time ago

Display size of any file on your filesystem. Useful for image upload sites, attachments for messages etc.

Thumbnail of File size function File size function

This PHP functions displays HTML source code of a given website. Can be used for data scraping or to include given websites to your site

Thumbnail of Source code of website Source code of website

This function generates random valid HEX color with or without #. It can return uppecase or lowercase characters just as prefered

Thumbnail of Random HEX color Random HEX color