PHP

Simple Cache

This fairly simple and easy to use PHP class can be used for web page caching purposes. Requirements:
  1. You should have writing permissions/ privileges for the caching folder (eg. chmod 666 or 777)!
  2. You should add some attached value (for example a cookie or a session value) for the logged in users!
  3. The caching object should be added right after the initialization of the session cookie!

Cache types table:


Usage:

Paypal without form

This class allows for one's basic usage of PayPal's services. Easy to use, easy to customize, this code allows for the minimum number of clicks.

Its usage requires one to import the PHP class where needed, and then instantiate its objects like below.

Usage:

Replace the last string occurence

This function replaces the last string occurrence in a given text with the specified string. This is may be an alternative for preg_replace() function

Replace only the first string occurence

This PHP functon will replace only the first string occurrence in a given text. This is an alternative for the preg_replace() function.

Newsletter

Sign up for inspiration, news and updates