If knowledge is power, then sharing knowledge is ultimate powertrip
Latest Updates
You are here: Home >> 2010 >> September

Monthly Archives: September 2010

get dpi of image in php

To get DPI of image in PHP, you can use the following code <?php function get_dpi($filename){ // open the file and read first 20 bytes. $a = fopen($filename,’r’); $string = fread($a,20); fclose($a); // get the value of byte 14th up to 18th $data = bin2hex(substr($string,14,4)); $x = substr($data,0,4); $y = substr($data,4,4); return array(hexdec($x),hexdec($y)); } // sample, output the result: print_r(get_dpi(‘demo_files/abc.png’)); ... Read More »

Increase website performance

Hi All, The following are few points that I just wanted to share with you all. These points are the basic that should be kept in mind to increase website performance . HAPPY CODING Don’t use .htaccess Lock all ports down Stop ping Cut Apache modules down to bare minimum required for security Do not install all PHP modules Benchmark ... Read More »

Scroll To Top