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
1.3k

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

Thumbnail of SEO String SEO String
1.2k

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
1.1k

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
892

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
3.0k

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
713