'; if($metaVal != ''){ echo "
First cached image from post"; echo '
Cache the image before displaying the thumbnail
'; } echo ''; echo '
'; $dir = WP_PLUGIN_DIR . "/amtythumb/cache"; $url = WP_PLUGIN_URL . "/amtythumb/cache"; echo "
Image path on server : " . $dir; echo "
Image url : " . $url; echo "
Images cached on File system"; if($handle=opendir($dir)){ while ( ($file = readdir($handle)) !==false) { if(preg_match('/^'. $postid .'_.*\.jpg/', $file)){ echo '
Cache the image before displaying the thumbnail
'.$file.'

'; } } closedir($handle); } echo '
'; } function amty_testPlugin($imgurl,$pid,$w,$h,$percent,$constrain,$zc){ if($pid != ''){ $starttime = time(); $img = amty_take_first_img_by_id($pid); $endtime = time(); echo "
Time to extract image from post: " . ($endtime - $starttime); }elseif($imgurl != ''){ $img = $imgurl; } //echo $img; $img_uri = WP_PLUGIN_DIR . "/amtythumb/testimage.jpg"; $img_url = WP_PLUGIN_URL . "/amtythumb/testimage.jpg"; //echo $img_uri; $starttime = time(); $endtime = time(); @unlink($img_uri); @resizeImg($img,$percent,$constrain,$w,$h,$zc,$img_uri); echo "
Time to resize image: " . ($endtime - $starttime); echo '
Original Image
'; echo ''; echo '
Resized Image
'; echo ''; } ?>