Archive

- Posts Tagged ‘function’

PHP Image Info Function. View Exif info of Images

Using PHP information function, you can write small script to review your camera setting at the time of image capture. Here is small script to view images in a folder with few important settings. Sample Output: If you want more information for each image then un-comment the line (//print_r($exif['EXIF']);) and… (Continue)

PHP Stream: stream_set_read_buffer and stream_set_write_buffer

First something about stream from PHP.net: Stream came to PHP in version 4.3 to generalize file, network, data compression, and other operations which share a common set of functions and uses. In its simplest definition, a stream is a resource object which exhibits streamable behavior. That is, it can be… (Continue)

PHP Date / Time Function: strtotime

PHP has number of date and time functions. One is date(), which I feel, is most used date and time function. Time() function can be another most used time function. But the most interesting date and time function I feel is the function strtotime(). It is interesting as it understand… (Continue)

Get User Defined Constants in PHP

PHP function - get_defined_constants()  gives all the constants defined in current scope.  It can be CORE Constants, extensions defined constants and user defined constants. As a developer you may be interested in all defined constants or user defined constants at a time. As the total number of constants printed on… (Continue)

JavaScript: Dynamically Attach Event Handler to any HTML Element

Want to attach an event handler to HTML element but not by writing as HTML property but directly using JavaScript! Attaching event dynamically for an element can be needed for the reason you do not have direct access to HTML element or for the reason you think that not attaching… (Continue)

Few very common String Functions in PHP

Here are few very common string functions in PHP for those who are new to PHP.  In that case just familiarize with these functions. addslashes Add backslash () before characters that need to be quoted before inserting into database. Those characters where backslash will be added are single quote ('),… (Continue)