Posts Tagged ‘snippets’

Showing date

Thursday, May 5th, 2011

Tags: ,
Posted in Snippets | No Comments »

Escaping chars in php

Thursday, May 5th, 2011

This script shows how to escape characters in php

Tags: ,
Posted in Snippets | No Comments »

Read txt file

Thursday, May 5th, 2011

This snippet opens a file, reads content from it and closes it.

Tags: ,
Posted in Snippets | No Comments »

Read file or site in a string

Thursday, May 5th, 2011

This snippet just reads the whole site in a string.

Tags: ,
Posted in Snippets | No Comments »

Calculate Central European Summer Time (CEST)

Tuesday, March 9th, 2010

Countries of the European Union add an hour to the time during summer to better seize sunlight, so for several months GMT 0 becomes GMT +1, GMT+1 becomes GMT-2 and so on. This is known as Central European Summer Time (CEST). This script takes a Unix timestamp and adds an hour to it (3600 seconds) if we are in this summer period.

Tags: ,
Posted in Snippets | No Comments »

Zodiac Signs

Tuesday, March 9th, 2010

Updated from the "Zodiac Signs" function already posted here. The other function had some overlapping month/day areas that would determine some birthdate/sign combinations incorrectly. (ie: 10/27 as Libra instead of Scorpio.)

Tags: ,
Posted in Snippets | No Comments »

OddEven Class

Tuesday, March 9th, 2010

Allows you to easily keep track of a series of items as either odd or even. Each time you check (using the "which" method) the counter increments so that the next time you check the state will have changed. This is the perfect class for using when you're outputting an HTML table and want to use different classes to differentiate between odd and even rows. Simply create a new instance and call OddEven->which() for each row!

Tags: ,
Posted in Snippets | No Comments »

File size of a string

Tuesday, January 12th, 2010

Using a string of text, find out how many kilobytes or bytes the string would and/or will take up in a file if it gets saved.

Tags: ,
Posted in Snippets | No Comments »

Mail from your php code

Wednesday, December 16th, 2009

This script will be used to mail someone from your code

Tags: ,
Posted in Snippets | No Comments »

MB CopyMCF-DIR :: Copying or Moving Files and Child Files from Source Dir to Destination Dir

Saturday, October 31st, 2009

Copying or Moving Files and Child Files from Source Dir to Destination Dir

Tags: ,
Posted in Snippets | No Comments »