Image Function

Posted by Lachhekumar Nadar on 2009-07-07 00:34:02

Image processing is added to the koolphp, this URL redirection will create the resized image. You can create the dymic resized image folder from the configuration file.

You can check the configuration details at installation > configuration

[images]
thumbnail    = 100x150
small        = 50x50
large        = 300x300
extra        = 500x500

Some of the sample url

  1. http://www.koolphp.com/large/test.jpg  this url will create the resize image of 300x300, the size is taken from the configuration file
  2. http://www.koolphp.com/extra/test.jpg this url will create the resize image of 500x500
  3. http://www.koolphp.com/test.jpg this url will  display the actual image

Now you may want to display the capcha, this can be simply done in koolphp just you have to add http://yoursite.com/capcha.gif and your capcha is on the screen

 

PHP Code
<?
/**
Getting the capcha key
*/
$key substr($_SESSION["_cap_key"],strlen($_SESSION["_cap_key"]) - 4,4);
?>

$key is containing the capcha session key