为您的主题增加美女图片展示功能

为您的主题增加美女图片展示功能,第1张

概述或许你没注意到,首页的菜单上面增加了美女欣赏,观赏地址:http://liuronghuan.com/girls主要使用了php来读取JSon,然后判断,如果有图片,那么进行输出,如果没有图片,就直接返回,后面还使用了timthumb.php来截…

或许你没注意到,首页的菜单上面增加了美女欣赏,观赏地址:主要使用了php来读取JSon,然后判断,如果有图片,那么进行输出,如果没有图片,就直接返回,后面还使用了timthumb.php来截取图片。要使用本功能,你先要在进行注册,获取美女图片的API。

第一步:获取API内容,并且创建文件是否存在的判断函数

第二步:判断文件是否存在,如果文件存在那么显示

newsList as $key) {?>picUrl);if ($exists) {?>            " target="_blank" rel="nofollow">/meinv/timthumb.php?src=picUrl;?>&h=196&w=263&zc=1" alt="title;?>">                                  " target="_blank" rel="nofollow">title;?>                                                            

其中使用到了timthumb.PHP,里面的代码如下:

/*

--- TimThumb CONFIGURATION ---To edit the configs it is best to create a file called timthumb-config.phpand define variables you want to customize in there. It will automatically beloaded by timthumb. This will save you having to re-edit these variableseverytime you download a new version
*/
define ('VERSION','2.8.14'); // Version of this script
//Load a config file if it exists. Otherwise,use the values below
if( file_exists(dirname(FILE) . '/timthumb-config.php')) require_once('timthumb-config.php');
if(! defined('DEBUG_ON') ) define ('DEBUG_ON',false); // Enable debug logging to web server error log (STDERR)
if(! defined('DEBUG_LEVEL') ) define ('DEBUG_LEVEL',1); // Debug level 1 is less noisy and 3 is the most noisy
if(! defined('MEMORY_LIMIT') ) define ('MEMORY_LIMIT','30M'); // Set PHP memory limit
if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS',false); // If the image or webshot is being loaded on an external site,display a red "No Hotlinking" gif.
if(! defined('DISPLAY_ERROR_MESSAGES') ) define ('DISPLAY_ERROR_MESSAGES',true); // Display error messages. Set to false to turn off errors (good for production websites)
//Image fetching and caching
if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL',TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES',true); // Less secure.
if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED',TRUE); // Should we store resized/modified images on disk to speed things up?
if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS',86400); // How often the cache is cleaned

if(! defined('FILE_CACHE_MAX_FILE_AGE') ) define ('FILE_CACHE_MAX_FILE_AGE',86400); // How old does a file have to be to be deleted from the cache
if(! defined('FILE_CACHE_SUFFIX') ) define ('FILE_CACHE_SUFFIX','.timthumb.txt'); // What to put at the end of all files in the cache directory so we can identify them
if(! defined('FILE_CACHE_PREFIX') ) define ('FILE_CACHE_PREFIX','timthumb'); // What to put at the beg of all files in the cache directory so we can identify them
if(! defined('FILE_CACHE_DIRECTORY') ) define ('FILE_CACHE_DIRECTORY','./cache'); // Directory where images are cached. Left blank it will use the system temporary directory (which is better for security)
if(! defined('MAX_FILE_SIZE') ) define ('MAX_FILE_SIZE',10485760); // 10 Megs is 10485760. This is the max internal or external file size that we'll process.
if(! defined('CURL_TIMEOUT') ) define ('CURL_TIMEOUT',20); // Timeout duration for Curl. This only applies if you have Curl installed and aren't using PHP's default URL fetching mechanism.
if(! defined('WAIT_BETWEEN_FETCH_ERRORS') ) define ('WAIT_BETWEEN_FETCH_ERRORS',3600); // Time to wait between errors fetching remote file

//Browser caching
if(! defined('BROWSER_CACHE_MAX_AGE') ) define ('BROWSER_CACHE_MAX_AGE',864000); // Time to cache in the browser
if(! defined('BROWSER_CACHE_DISABLE') ) define ('BROWSER_CACHE_DISABLE',false); // Use for testing if you want to disable all browser caching

//Image size and defaults
if(! defined('MAX_WIDTH') ) define ('MAX_WIDTH',1500); // Maximum image width
if(! defined('MAX_HEIGHT') ) define ('MAX_HEIGHT',1500); // Maximum image height
if(! defined('NOT_FOUND_IMAGE') ) define ('NOT_FOUND_IMAGE',''); // Image to serve if any 404 occurs
if(! defined('ERROR_IMAGE') ) define ('ERROR_IMAGE',''); // Image to serve if an error occurs instead of showing error message
if(! defined('PNG_IS_TRANSPARENT') ) define ('PNG_IS_TRANSPARENT',FALSE); // Define if a png image should have a transparent background color. Use False value if you want to display a custom coloured canvas_colour
if(! defined('DEFAULT_Q') ) define ('DEFAULT_Q',90); // Default image quality. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_ZC') ) define ('DEFAULT_ZC',1); // Default zoom/crop setting. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_F') ) define ('DEFAULT_F',''); // Default image filters. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_S') ) define ('DEFAULT_S',0); // Default sharpen value. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_CC') ) define ('DEFAULT_CC','ffffff'); // Default canvas colour. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_WIDTH') ) define ('DEFAULT_WIDTH',100); // Default thumbnail width. Allows overrid in timthumb-config.php
if(! defined('DEFAULT_HEIGHT') ) define ('DEFAULT_HEIGHT',100); // Default thumbnail height. Allows overrid in timthumb-config.php

/**

Additional Parameters:LOCAL_FILE_BASE_DIRECTORY = Override the DOCUMENT_ROOT. This is best used in timthumb-config.php
*/

//Image compression is enabled if either of these point to valid paths

//These are now disabled by default because the file sizes of PNGs (and GIFs) are much smaller than we used to generate.
//They only work for PNGs. GIFs and JPEGs are not affected.
if(! defined('OPTIPNG_ENABLED') ) define ('OPTIPNG_ENABLED',false);
if(! defined('OPTIPNG_PATH') ) define ('OPTIPNG_PATH','/usr/bin/optipng'); //This will run first because it gives better compression than pngcrush.
if(! defined('PNGCRUSH_ENABLED') ) define ('PNGCRUSH_ENABLED',false);
if(! defined('PNGCRUSH_PATH') ) define ('PNGCRUSH_PATH','/usr/bin/pngcrush'); //This will only run if OPTIPNG_PATH is not set or is not valid

/*
-------====Website Screenshots configuration - BETA====-------

    If you just want image thumbnails and don't want website screenshots,you can safely leave this as is.      If you would like to get website screenshots set up,you will need root access to your own server.    Enable ALLOW_ALL_EXTERNAL_SITES so you can fetch any external web page. This is more secure now that we're using a non-web folder for cache.    Enable BLOCK_EXTERNAL_LEECHERS so that your site doesn't generate thumbnails for the whole Internet.    Instructions to get website screenshots enabled on Ubuntu Linux:    1. Install Xvfb with the following command: sudo apt-get install subversion libqt4-webkit libqt4-dev g++ xvfb    2. Go to a directory where you can download some code    3. Check-out the latest version of CutyCapt with the following command: svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt    4. Compile CutyCapt by doing: cd cutycapt/CutyCapt    5. qmake    6. make    7. cp CutyCapt /usr/local/bin/    8. Test it by running: xvfb-run --server-args="-screen 0,1024x768x24" CutyCapt --url="http://markmaunder.com/" --out=test.png    9. If you get a file called test.png with something in it,it probably worked. Now test the script by accessing it as follows:    10. http://yoursite.com/path/to/timthumb.php?src=http://markmaunder.com/&amp;webshot=1    Notes on performance:     The first time a webshot loads,it will take a few seconds.    From then on it uses the regular timthumb caching mechanism with the configurable options above    and loading will be very fast.    --ADVANCED USERS ONLY--    If you'd like a slight speedup (about 25%) and you know Linux,you can run the following command which will keep Xvfb running in the background.    nohup Xvfb :100 -ac -nolisten tcp -screen 0,1024x768x24 > /dev/n<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>l 2>&amp;1 &amp;    Then set WEBSHOT_XVFB_RUNNING = true below. This will save your server having to fire off a new Xvfb server and shut it down every time a new shot is generated.     You will need to take responsibi<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ty for kee<a href="https://m.jb51.cc/tag/Ping/" target="_blank" >Ping</a> Xvfb running in case it crashes. (It seems pretty s<a href="https://m.jb51.cc/tag/table/" target="_blank" >table</a>)    You will also need to take responsibi<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ty for server s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> if you're running Xvfb as root. 

*/
if(! defined('WEBSHOT_ENABLED') ) define ('WEBSHOT_ENABLED',false); //Beta feature. Adding webshot=1 to your query string will cause the script to return a browser screenshot rather than try to fetch an image.
if(! defined('WEBSHOT_CUTYCAPT') ) define ('WEBSHOT_CUTYCAPT','/usr/local/bin/CutyCapt'); //The path to CutyCapt.
if(! defined('WEBSHOT_XVFB') ) define ('WEBSHOT_XVFB','/usr/bin/xvfb-run'); //The path to the Xvfb server
if(! defined('WEBSHOT_SCREEN_X') ) define ('WEBSHOT_SCREEN_X','1024'); //1024 works ok
if(! defined('WEBSHOT_SCREEN_Y') ) define ('WEBSHOT_SCREEN_Y','768'); //768 works ok
if(! defined('WEBSHOT_color_DEPTH') ) define ('WEBSHOT_color_DEPTH','24'); //I haven't tested anything besIDes 24
if(! defined('WEBSHOT_IMAGE_FORMAT') ) define ('WEBSHOT_IMAGE_FORMAT','png'); //png is about 2.5 times the size of jpg but is a LOT better quality
if(! defined('WEBSHOT_TIMEOUT') ) define ('WEBSHOT_TIMEOUT','20'); //Seconds to wait for a webshot
if(! defined('WEBSHOT_USER_AGENT') ) define ('WEBSHOT_USER_AGENT',"Mozilla/5.0 (windows; U; windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110614 firefox/3.6.18"); //I hate to do this,but a non-browser robot user agent might not show what humans see. So we pretend to be firefox
if(! defined('WEBSHOT_JavaScript_ON') ) define ('WEBSHOT_JavaScript_ON',true); //Setting to false might give you a slight speedup and block ads. But it Could cause other issues.
if(! defined('WEBSHOT_JAVA_ON') ) define ('WEBSHOT_JAVA_ON',false); //Have only tested this as fase
if(! defined('WEBSHOT_PLUGINS_ON') ) define ('WEBSHOT_PLUGINS_ON',true); //Enable flash and other plugins
if(! defined('WEBSHOT_PROXY') ) define ('WEBSHOT_PROXY',''); //In case you're behind a proxy server.
if(! defined('WEBSHOT_XVFB_RUNNING') ) define ('WEBSHOT_XVFB_RUNNING',false); //ADVANCED: Enable this if you've got Xvfb running in the background.

// If ALLOW_EXTERNAL is true and ALLOW_ALL_EXTERNAL_SITES is false,then external images will only be fetched from these domains and their subdomains.
if(! isset($ALLOWED_SITES)){
$ALLOWED_SITES = array (
'flickr.com','staticflickr.com','picasa.com','img.youtube.com','upload.wikimedia.org','photobucket.com','imgur.com','imagesHack.us','tinypic.com',);
}
// -------------------------------------------------------------
// -------------- Stop EDITING CONfigURATION HERE --------------
// -------------------------------------------------------------

timthumb::start();

class timthumb {
protected $src = "";
protected $is404 = false;
protected $docRoot = "";
protected $lastURLError = false;
protected $localimage = "";
protected $localimageMTime = 0;
protected $url = false;
protected $myHost = "";
protected $isURL = false;
protected $cachefile = '';
protected $errors = array();
protected $toDeletes = array();
protected $cacheDirectory = '';
protected $startTime = 0;
protected $lastBenchTime = 0;
protected $croptop = false;
protected $salt = "";
protected $fileCacheVersion = 1; //Generally if timthumb.PHP is modifed (upgraded) then the salt changes and all cache files are recreated. This is a backup mechanism to force regen.
protected $filePrependSecurityBlock = "<?php die('Execution denied!'); //"; //Designed to have three letter mime type,space,question mark and greater than symbol appended. 6 bytes total.
protected static $curlDataWritten = 0;
protected static $curlFH = false;
public static function start(){
$tim = new timthumb();
$tim->handleErrors();
$tim->securityChecks();
if($tim->trybrowserCache()){
exit(0);
}
$tim->handleErrors();
if(file_CACHE_ENABLED && $tim->tryServerCache()){
exit(0);
}
$tim->handleErrors();
$tim->run();
$tim->handleErrors();
exit(0);
}
public function construct(){
global $ALLOWED_SITES;
$this->startTime = microtime(true);
date_default_timezone_set('UTC');
$this->deBUG(1,"Starting new request from " . $this->getIP() . " to " . $_SERVER['REQUEST_URI']);
$this->calcDocRoot();
//On windows systems I'm assuming fileinode returns an empty string or a number that doesn't change. Check this.
$this->salt = @filemtime(file) . '-' . @fileinode(__file);
$this->deBUG(3,"Salt is: " . $this->salt);
if(file_CACHE_DIRECTORY){
if(! is_dir(file_CACHE_DIRECTORY)){
@mkdir(file_CACHE_DIRECTORY);
if(! is_dir(file_CACHE_DIRECTORY)){
$this->error("Could not create the file cache directory.");
return false;
}
}
$this->cacheDirectory = file_CACHE_DIRECTORY;
if (!touch($this->cacheDirectory . '/index.HTML')) {
$this->error("Could not create the index.HTML file - to fix this create an empty file named index.HTML file in the cache directory.");
}
} else {
$this->cacheDirectory = sys_get_temp_dir();
}
//Clean the cache before we do anything because we don't want the first visitor after file_CACHE_TIME_BETWEEN_CLEANS expires to get a stale image.
$this->cleanCache();

            $this->myHost = preg_replace('/^www\./i','',$_SERVER['<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_HOST']);            $this->src = $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('src');            $this->url = parse_url($this->src);            $this->src = preg_replace('/<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>s?:\/\/(?:www\.)?' . $this->myHost . '/i',$this->src);            if(strlen($this->src) <= 3){                    $this->error("No image specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d");                    return false;            }            if(BLOCK_EXTERNAL_LEECHERS &amp;&amp; array_key_exists('<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_REFERER',$_SERVER) &amp;&amp; (! preg_match('/^<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>s?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i',$_SERVER['<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_REFERER']))){                    // base64 encoded red image that says 'no hot<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>ers'                    // <a href="https://www.jb51.cc/tag/nothing/" target="_blank" >nothing</a> to worry about! &#x1f642;                    $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Data = base64_decode("R0lGODlhUAAMAIAAAP8AAP///yH5BAAHAP8ALAAAAABQAAwAAAJpjI+py+0Po5y0OgAMjjv01YUZ\nOGplhWXfNa6JCLnWkXplrcBmW+spbwvaVr/cDyg7IoFC2KbYVC2NQ5MQ4ZNao9Ynzjl9ScNYpneb\nD<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>B3RP6JuPuaGfuuV4fumf8PuvqFyhYtjdoeFgAADs=");                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Content-Type: image/gif');                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Content-Length: ' . strlen($<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Data));                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Cache-Contr<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>: no-store,no-cache,must-reval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>ate,max-age=0');                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>("Pragma: no-cache");                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Expires: ' . gmdate ('D,d M Y H:i:s',time()));                    echo $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Data;                    return false;                    exit(0);            }            if(preg_match('/^<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>s?:\/\/[^\/]+/i',$this->src)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Is a request for an external URL: " . $this->src);                    $this->isURL = true;            } else {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Is a request for an internal <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>: " . $this->src);            }            if($this->isURL &amp;&amp; (! ALLOW_EXTERNAL)){                    $this->error("You are not allowed to fetch images from an external website.");                    return false;            }            if($this->isURL){                    if(ALLOW_ALL_EXTERNAL_SITES){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Fetching from all external sites is enabled.");                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Fetching only from selected external sites is enabled.");                            $allowed = false;                            foreach($ALLOWED_SITES as $site){                                    if ((strt<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ower(substr($this->url['host'],-strlen($site)-1)) === strt<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ower(".$site")) || (strt<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ower($this->url['host'])===strt<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ower($site))) {                                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"URL host<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a> {$this->url['host']} matches $site so allowing.");                                            $allowed = true;                                    }                            }                            if(! $allowed){                                    return $this->error("You may not fetch images from that site. To enable this site in timthumb,you can either add it to $ALLOWED_SITES and set ALLOW_EXTERNAL=true. Or you can set ALLOW_ALL_EXTERNAL_SITES=true,depending on your s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> needs.");                            }                    }            }            $cachePrefix = ($this->isURL ? '_ext_' : '_int_');            if($this->isURL){                    $arr = explode('&amp;',$_SERVER ['<a href="https://m.jb51.cc/tag/query/" target="_blank" >query</a>_STRING']);                    asort($arr);                    $this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = $this->cacheDirectory . '/' . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_PREFIX . $cachePrefix . md5($this->salt . implode('',$arr) . $this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>CacheVersion) . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_SUFFIX;            } else {                    $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage = $this->getLoca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>magePath($this->src);                    if(! $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not find the local image: {$this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage}");                            $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not find the internal image you specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d.");                            $this->set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>();                            return false;                    }                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"Local image path is {$this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage}");                    $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mageMTime = @<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>mtime($this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage);                    //We include the mtime of the local <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> in case in changes on <a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>k.                    $this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = $this->cacheDirectory . '/' . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_PREFIX . $cachePrefix . md5($this->salt . $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mageMTime . $_SERVER ['<a href="https://m.jb51.cc/tag/query/" target="_blank" >query</a>_STRING'] . $this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>CacheVersion) . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_SUFFIX;            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Cache <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> is: " . $this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            return true;    }    pub<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>c function __destruct(){            foreach($this->toDeletes as $del){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(2,"Deleting temp <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> $del");                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($del);            }    }    pub<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>c function run(){            if($this->isURL){                    if(! ALLOW_EXTERNAL){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"Got a request for an external image but ALLOW_EXTERNAL is <a href="https://m.jb51.cc/tag/Disabled/" target="_blank" >Disabled</a> so returning error msg.");                            $this->error("You are not allowed to fetch images from an external website.");                            return false;                    }                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Got request for external image. Starting serveExterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage.");                    if($this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('webshot')){                            if(WEBSHOT_ENABLED){                                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"webshot p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m is set,so we're going to take a webshot.");                                    $this->serveWebshot();                            } else {                                    $this->error("You added the webshot p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>meter but webshots are <a href="https://m.jb51.cc/tag/Disabled/" target="_blank" >Disabled</a> on this server. You need to set WEBSHOT_ENABLED == true to enable webshots.");                            }                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"webshot is NOT set so we're going to try to fetch a reg<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>ar image.");                            $this->serveExterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage();                    }            } else {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Got request for internal image. Starting serveInterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage()");                    $this->serveInterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage();            }            return true;    }    protected function handleErrors(){            if($this->haveErrors()){                     if(NOT_FOUND_IMAGE &amp;&amp; $this->is<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>()){                            if($this->serve<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>(NOT_FOUND_IMAGE)){                                    exit(0);                            } else {                                    $this->error("Additionally,the <a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a> image that is con<a href="https://www.jb51.cc/tag/fig/" target="_blank" >fig</a>ured <a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not be found or there was an error serving it.");                            }                    }                    if(ERROR_IMAGE){                            if($this->serve<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>(ERROR_IMAGE)){                                    exit(0);                            } else {                                    $this->error("Additionally,the error image that is con<a href="https://www.jb51.cc/tag/fig/" target="_blank" >fig</a>ured <a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not be found or there was an error serving it.");                            }                    }                    $this->serveErrors();                     exit(0);             }            return false;    }    protected function try<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>wserCache(){            if(<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>WSER_CACHE_<a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>ABLE){ $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>wser caching is <a href="https://m.jb51.cc/tag/Disabled/" target="_blank" >Disabled</a>"); return false; }            if(!empty($_SERVER['<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_IF_MODIF<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>D_SINCE']) ){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Got a conditional get");                    $mtime = false;                    //We've already checked if the real <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> exists in the constructor                    if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                            //If we don't have something cached,regenerate the cached image.                            return false;                    }                    if($this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mageMTime){                            $mtime = $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mageMTime;                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Local real <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>'s modification time is $mtime");                    } else if(is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){ //If it's not a local request then use the mtime of the cached <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> to deter<a href="https://www.jb51.cc/tag/mine/" target="_blank" >mine</a> the 304                            $mtime = @<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>mtime($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Cached <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>'s modification time is $mtime");                    }                    if(! $mtime){ return false; }                    $iftime = strtotime($_SERVER['<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_IF_MODIF<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>D_SINCE']);                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"The conditional get's if-modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d-since unixtime is $iftime");                    if($iftime < 1){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Got an inval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> conditional get modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d since time. Returning false.");                            return false;                    }                    if($iftime < $mtime){ //Real file or cache file has been modified since last request,so force refetch.                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> has been modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d since last fetch.");                            return false;                    } else { //Otherwise serve a 304                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> has not been modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d since last get,so serving a 304.");                            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ($_SERVER['SERVER_PROTOC<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>'] . ' 304 Not Modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d');                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"Returning 304 not modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d");                            return true;                    }            }            return false;    }    protected function tryServerCache(){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Trying server cache");            if(<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_exists($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> {$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>} exists");                    if($this->isURL){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"This is an external request,so checking if the cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> is empty which means the request <a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a> prev<a href="https://www.jb51.cc/tag/IoU/" target="_blank" >IoU</a>sly.");                            if(<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) < 1){                                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Found an empty cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> indicating a <a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a> earl<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>r request. Checking how <a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>d it is.");                                    //Fetching error occured prev<a href="https://www.jb51.cc/tag/IoU/" target="_blank" >IoU</a>sly                                    if(time() - @<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>mtime($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) > WAIT_BETWEEN_FETCH_ERRORS){                                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> is <a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>der than " . WAIT_BETWEEN_FETCH_ERRORS . " seconds. Deleting and returning false so app can try and load <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");                                            @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                                            return false; //to indicate we d<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>n't serve from cache and app sho<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>d try and load                                    } else {                                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Empty cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> is still fresh so returning message saying we had an error fetching this image from remote host.");                                            $this->set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>();                                            $this->error("An error occured fetching image.");                                            return false;                                     }                            }                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Trying to serve cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> {$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>}");                    }                    if($this->serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>()){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Succesf<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>ly served cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> {$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>}");                            return true;                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a> to serve cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> {$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>} - Deleting it from cache.");                            //Image serving <a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a>. We can't retry at this point,but lets remove it from cache so the next request recreates it                            @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                            return true;                    }            }    }    protected function error($err){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Adding error message: $err");            $this->errors[] = $err;            return false;    }    protected function haveErrors(){            if(sizeof($this->errors) > 0){                    return true;            }            return false;    }    protected function serveErrors(){            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ($_SERVER['SERVER_PROTOC<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>'] . ' 400 Bad Request');            if ( ! <a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>PLAY_ERROR_MESSAGES ) {                    return;            }            $<a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a> = '<ul>';            foreach($this->errors as $err){                    $<a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a> .= '<li>' . <a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a>entit<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s($err) . '</li>';            }            $<a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a> .= '</ul>';            echo '<h1>A TimThumb error has occured</h1>The f<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>lowing error(s) occured:<br />' . $<a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a> . '<br />';            echo '<br /><a href="https://m.jb51.cc/tag/query/" target="_blank" >query</a> String : ' . <a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a>entit<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s( $_SERVER['<a href="https://m.jb51.cc/tag/query/" target="_blank" >query</a>_STRING'],ENT_QUOTES );            echo '<br />TimThumb version : ' . VERSION . '</pre>';    }    protected function serveInterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage(){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Local image path is $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage");            if(! $this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage){                    $this->sanityFail("loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage not set after verifying it earl<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>r in the code.");                    return false;            }            $<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>Size = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage);            if($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>Size > MAX_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_SIZE){                    $this->error("The <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> you specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d is greater than the maximum allowed <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> size.");                    return false;            }            if($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>Size <= 0){                    $this->error("The <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> you specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d is <= 0 bytes.");                    return false;            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Cal<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ng processImageAn<a href="https://m.jb51.cc/tag/DW/" target="_blank" >DW</a>rit<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>Cache() for local image.");            if($this->processImageAn<a href="https://m.jb51.cc/tag/DW/" target="_blank" >DW</a>rit<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>Cache($this->loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage)){                    $this->serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>();                    return true;            } else {                     return false;            }    }    protected function cleanCache(){            if (<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_TIME_BETWEEN_CLEANS < 0) {                    return;            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"cleanCache() called");            $lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = $this->cacheDirectory . '/timthumb_cacheLastCleanTime.<a href="https://m.jb51.cc/tag/touch/" target="_blank" >touch</a>';            //If this is a new timthumb installation we need to create the <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>            if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> tracking last clean doesn't exist. Creating $lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>");                    if (!<a href="https://m.jb51.cc/tag/touch/" target="_blank" >touch</a>($lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)) {                            $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not create cache clean timestamp <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");                    }                    return;            }            if(@<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>mtime($lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) < (time() - FILE_CACHE_TIME_BETWEEN_CLEANS) ){ //Cache was last cleaned more than 1 day ago                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"Cache was last cleaned more than " . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_TIME_BETWEEN_CLEANS . " seconds ago. Cleaning <a href="https://www.jb51.cc/tag/Now/" target="_blank" >Now</a>.");                    // Very s<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ght race condition here,but worst case we'll have 2 or 3 servers cleaning the cache sim<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>taneously once a day.                    if (!<a href="https://m.jb51.cc/tag/touch/" target="_blank" >touch</a>($lastClean<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)) {                            $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not create cache clean timestamp <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");                    }                    $<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>s = glob($this->cacheDirectory . '/*' . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_SUFFIX);                    if ($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>s) {                            $timeAgo = time() - <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_MAX_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_AGE;                            foreach($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>s as $<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>){                                    if(@<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>mtime($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) < $timeAgo){                                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Deleting cache <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> $<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> <a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>der than max age: " . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_MAX_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_AGE . " seconds");                                            @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                                    }                            }                    }                    return true;            } else {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Cache was cleaned less than " . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_CACHE_TIME_BETWEEN_CLEANS . " seconds ago so no cleaning needed.");            }            return false;    }    protected function processImageAn<a href="https://m.jb51.cc/tag/DW/" target="_blank" >DW</a>rit<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>Cache($loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage){            $sData = ge<a href="https://www.jb51.cc/tag/timage/" target="_blank" >timage</a>size($loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage);            $origType = $sData[2];            $mimeType = $sData['mime'];            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Mime type of image is $mimeType");            if(! preg_match('/^image\/(?:gif|jpg|jpeg|png)$/i',$mimeType)){                    return $this->error("The image being resized is not a val<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> gif,jpg or png.");            }            if (!function_exists ('imagecreatetrue<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>')) {                return $this->error('GD <a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>brary Error: imagecreatetrue<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> does not exist - please contact your webhost and ask them to install the GD <a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>brary');            }            if (function_exists ('imagefilter') &amp;&amp; <a href="https://m.jb51.cc/tag/define/" target="_blank" >define</a>d ('<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_NEGATE')) {                    $imageFilters = array (                            1 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_NEGATE,0),2 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_GRAYSCALE,3 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_BRIGHT<a href="https://www.jb51.cc/tag/nes/" target="_blank" >nes</a>S,1),4 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_CONTRAST,5 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>IZE,4),6 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_EDGEDETECT,7 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_<a href="https://www.jb51.cc/tag/embos/" target="_blank" >embos</a>S,8 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_GAUSSIAN_BLUR,9 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_SELECTIVE_BLUR,10 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_MEAN_REM<a href="https://www.jb51.cc/tag/oval/" target="_blank" >oval</a>,11 => array (<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_SMOOTH,);            }            // get standard <a href="https://m.jb51.cc/tag/input/" target="_blank" >input</a> propert<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s                            $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th =  (int) abs ($this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('w',0));            $new_height = (int) abs ($this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('h',0));            $zoom_crop = (int) $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('zc',DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_ZC);            $qua<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ty = (int) abs ($this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('q',DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_Q));            $a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn = $this->crop<a href="https://m.jb51.cc/tag/top/" target="_blank" >top</a> ? 't' : $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('a','c');            $filters = $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('f',DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_F);            $sharpen = (bo<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>) $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('s',DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_S);            $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> = $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('cc',DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_CC);            $canvas_trans = (bo<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>) $this->p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m('ct','1');            // set defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th and height if neither are set already            if ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th == 0 &amp;&amp; $new_height == 0) {                $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = (int) DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_W<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>TH;                $new_height = (int) DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_HEIGHT;            }            // ensure size <a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mits can not be abused            $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = min ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th,MAX_W<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>TH);            $new_height = min ($new_height,MAX_HEIGHT);            // set memory <a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mit to be able to have enough space to resize larger images            $this->setMemory<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mit();            // open the existing image            $image = $this->openImage ($mimeType,$loca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage);            if ($image === false) {                    return $this->error('Unable to open image.');            }            // Get original w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th and height            $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = imagesx ($image);            $height = imagesy ($image);            $origin_x = 0;            $origin_y = 0;            // generate new w/h if not prov<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>ed            if ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th &amp;&amp; !$new_height) {                    $new_height = floor ($height * ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th));            } else if ($new_height &amp;&amp; !$new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th) {                    $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = floor ($w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th * ($new_height / $height));            }            // scale down and add <a href="https://m.jb51.cc/tag/border/" target="_blank" >border</a>s            if ($zoom_crop == 3) {                    $final_height = $height * ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th);                    if ($final_height > $new_height) {                            $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th * ($new_height / $height);                    } else {                            $new_height = $final_height;                    }            }            // create a new true <a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> image            $canvas = imagecreatetrue<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th,$new_height);            image<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a>blending ($canvas,false);            if (strlen($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>) == 3) { //if is 3-char notation,edit string into 6-char notation                    $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> =  str_repeat(substr($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>,2) . str_repeat(substr($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>,1,2,2);             } else if (strlen($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>) != 6) {                    $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> = DEFA<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>T_CC; // on error return defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t canvas <a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>            }            $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_R = hexdec (substr ($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>,2));            $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_G = hexdec (substr ($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>,2));            $canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_B = hexdec (substr ($canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>,4,2));            // Create a new <a href="https://m.jb51.cc/tag/transparent/" target="_blank" >transparent</a> <a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> for image        // If is a png and PNG_IS_<a href="https://m.jb51.cc/tag/transparent/" target="_blank" >transparent</a> is false then remove the <a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a> transparency             // (and if is set a canvas <a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> show it in the background)            if(preg_match('/^image\/png$/i',$mimeType) &amp;&amp; !PNG_IS_<a href="https://m.jb51.cc/tag/transparent/" target="_blank" >transparent</a> &amp;&amp; $canvas_trans){                     $<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> = image<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>allocate<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a> ($canvas,$canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_R,$canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_G,$canvas_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_B,127);                         }else{                    $<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a> = image<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>allocate<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a> ($canvas,0);            }            // Completely fill the background of the new image with allocated <a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>.            imagefill ($canvas,$<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>);            // scale down and add <a href="https://m.jb51.cc/tag/border/" target="_blank" >border</a>s            if ($zoom_crop == 2) {                    $final_height = $height * ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th);                    if ($final_height > $new_height) {                            $origin_x = $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / 2;                            $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th = $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th * ($new_height / $height);                            $origin_x = round ($origin_x - ($new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / 2));                    } else {                            $origin_y = $new_height / 2;                            $new_height = $final_height;                            $origin_y = round ($origin_y - ($new_height / 2));                    }            }            // Restore transparency blending            imagesave<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a> ($canvas,true);            if ($zoom_crop > 0) {                    $src_x = $src_y = 0;                    $src_w = $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th;                    $src_h = $height;                    $cmp_x = $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th;                    $cmp_y = $height / $new_height;                    // cal<a href="https://www.jb51.cc/tag/cula/" target="_blank" >cula</a>te x or y coordinate and w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th or height of source                    if ($cmp_x > $cmp_y) {                            $src_w = round ($w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $cmp_x * $cmp_y);                            $src_x = round (($w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th - ($w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th / $cmp_x * $cmp_y)) / 2);                    } else if ($cmp_y > $cmp_x) {                            $src_h = round ($height / $cmp_y * $cmp_x);                            $src_y = round (($height - ($height / $cmp_y * $cmp_x)) / 2);                    }                    // <a href="https://m.jb51.cc/tag/position/" target="_blank" >position</a>al crop<a href="https://m.jb51.cc/tag/Ping/" target="_blank" >Ping</a>!                    if ($a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn) {                            if (strpos ($a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn,'t') !== false) {                                    $src_y = 0;                            }                            if (strpos ($a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn,'b') !== false) {                                    $src_y = $height - $src_h;                            }                            if (strpos ($a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn,'l') !== false) {                                    $src_x = 0;                            }                            if (strpos ($a<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>gn,'r') !== false) {                                    $src_x = $w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th - $src_w;                            }                    }                    image<a href="https://www.jb51.cc/tag/cop/" target="_blank" >cop</a>yresampled ($canvas,$image,$origin_x,$origin_y,$src_x,$src_y,$new_w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th,$new_height,$src_w,$src_h);            } else {                    // <a href="https://www.jb51.cc/tag/cop/" target="_blank" >cop</a>y and resize part of an image with <a href="https://www.jb51.cc/tag/resampling/" target="_blank" >resampling</a>                    image<a href="https://www.jb51.cc/tag/cop/" target="_blank" >cop</a>yresampled ($canvas,$w<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>th,$height);            }            if ($filters != '' &amp;&amp; function_exists ('imagefilter') &amp;&amp; <a href="https://m.jb51.cc/tag/define/" target="_blank" >define</a>d ('<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_FILTER_NEGATE')) {                    // apply filters to image                    $filter<a href="https://m.jb51.cc/tag/List/" target="_blank" >List</a> = explode ('|',$filters);                    foreach ($filter<a href="https://m.jb51.cc/tag/List/" target="_blank" >List</a> as $fl) {                            $filterSettings = explode (',',$fl);                            if (isset ($imageFilters[$filterSettings[0]])) {                                    for ($i = 0; $i < 4; $i ++) {                                            if (!isset ($filterSettings[$i])) {                                                    $filterSettings[$i] = null;                                            } else {                                                    $filterSettings[$i] = (int) $filterSettings[$i];                                            }                                    }                                    switch ($imageFilters[$filterSettings[0]][1]) {                                            case 1:                                                    imagefilter ($canvas,$imageFilters[$filterSettings[0]][0],$filterSettings[1]);                                                    break;                                            case 2:                                                    imagefilter ($canvas,$filterSettings[1],$filterSettings[2]);                                                    break;                                            case 3:                                                    imagefilter ($canvas,$filterSettings[2],$filterSettings[3]);                                                    break;                                            case 4:                                                    imagefilter ($canvas,$filterSettings[3],$filterSettings[4]);                                                    break;                                            default:                                                    imagefilter ($canvas,$imageFilters[$filterSettings[0]][0]);                                                    break;                                    }                            }                    }            }            // sharpen image            if ($sharpen &amp;&amp; function_exists ('imageconvolution')) {                    $sharpenMatrix = array (                                    array (-1,-1,-1),array (-1,16,);                    $divisor = 8;                    $offset = 0;                    imageconvolution ($canvas,$sharpenMatrix,$divisor,$offset);            }            //Straight from WordPress core code. Reduces filesize by up to 70% for PNG's            if ( (IMAGETYPE_PNG == $origType || IMAGETYPE_GIF == $origType) &amp;&amp; function_exists('imageistruecolor') &amp;&amp; !imageistruecolor( $image ) &amp;&amp; imagecolortransparent( $image ) > 0 ){                    imagetrue<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a><a href="https://m.jb51.cc/tag/top/" target="_blank" >top</a>alette( $canvas,false,image<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>stotal( $image ) );            }            $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type = "";            $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = tempnam($this->cacheDirectory,'timthumb_tmp<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_');            if(preg_match('/^image\/(?:jpg|jpeg)$/i',$mimeType)){                     $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type = 'jpg';                    imagejpeg($canvas,$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,$qua<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ty);             } else if(preg_match('/^image\/png$/i',$mimeType)){                     $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type = 'png';                    imagepng($canvas,floor($qua<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ty * 0.09));            } else if(preg_match('/^image\/gif$/i',$mimeType)){                    $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type = 'gif';                    imagegif($canvas,$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            } else {                    return $this->sanityFail("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not match mime type after verifying it prev<a href="https://www.jb51.cc/tag/IoU/" target="_blank" >IoU</a>sly.");            }            if($<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type == 'png' &amp;&amp; OPTIPNG_ENABLED &amp;&amp; OPTIPNG_PATH &amp;&amp; @is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>(OPTIPNG_PATH)){                    $exec = OPTIPNG_PATH;                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"optipng'ing $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>");                    $presize = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    $out = `$exec -o1 $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>`; //you can use up to -o7 but it really slows things down                    <a href="https://www.jb51.cc/tag/clearstatcache/" target="_blank" >clearstatcache()</a>;                    $aftersize = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    $sizeDrop = $presize - $aftersize;                    if($sizeDrop > 0){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"optipng reduced size by $sizeDrop");                    } else if($sizeDrop < 0){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"optipng increased size! Difference was: $sizeDrop");                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"optipng d<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> not change image size.");                    }            } else if($<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type == 'png' &amp;&amp; PNGC<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a>_ENABLED &amp;&amp; PNGC<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a>_PATH &amp;&amp; @is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>(PNGC<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a>_PATH)){                    $exec = PNGC<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a>_PATH;                    $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2 = tempnam($this->cacheDirectory,'timthumb_tmp<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_');                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"pngc<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a>'ing $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> to $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2");                    $out = `$exec $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2`;                    $todel = "";                    if(is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2)){                            $sizeDrop = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) - <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2);                            if($sizeDrop > 0){                                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"pngc<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a> was succesf<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a> and gave a $sizeDrop byte size reduction");                                    $todel = $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>;                                    $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2;                            } else {                                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"pngc<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a> d<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> not reduce <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> size. Difference was $sizeDrop bytes.");                                    $todel = $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2;                            }                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"pngc<a href="https://www.jb51.cc/tag/rush/" target="_blank" >rush</a> <a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a> with output: $out");                            $todel = $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>2;                    }                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($todel);            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://www.jb51.cc/tag/rewriting/" target="_blank" >rewriting</a> image with s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>.");            $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>4 = tempnam($this->cacheDirectory,'timthumb_tmp<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>_');            $context = stream_context_create ();            $fp = fopen($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,'r',$context);            <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_put_contents($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>4,$this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>PrependS<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Block . $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type . ' ?' . '>'); //6 extra bytes,f<a href="https://www.jb51.cc/tag/irs/" target="_blank" >irs</a>t 3 being image type             <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_put_contents($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>4,$fp,<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_APPEND);            fclose($fp);            @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Locking and replacing cache <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");            $lock<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = $this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> . '.lock';            $fh = fopen($lock<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,'w');            if(! $fh){                    return $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not open the lock<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> for writing an image.");            }            if(flock($fh,LOCK_EX)){                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>); //re<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a> generally overwrites,but doing this in case of platform specific quirks. <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> might not exist yet.                    re<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>4,$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    flock($fh,LOCK_UN);                    fclose($fh);                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($lock<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            } else {                    fclose($fh);                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($lock<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>4);                    return $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not get a lock for writing.");            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Done image replace with s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>. Cleaning up and running cleanCache()");            imagedestroy($canvas);            imagedestroy($image);            return true;    }    protected function calcDocRoot(){            $docRoot = @$_SERVER['<a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a>_ROOT'];            if (<a href="https://m.jb51.cc/tag/define/" target="_blank" >define</a>d('LOCAL_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_BASE_DIRECTORY')) {                    $docRoot = LOCAL_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_BASE_DIRECTORY;               }            if(!isset($docRoot)){                     $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a>_ROOT is not set. This is probably <a href="https://m.jb51.cc/tag/windows/" target="_blank" >windows</a>. Starting search 1.");                    if(isset($_SERVER['SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>'])){                            $docRoot = str_replace( '\','/',substr($_SERVER['SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>'],0-strlen($_SERVER['<a href="https://www.jb51.cc/tag/PHP/" target="_blank" >PHP</a>_SELF'])));                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Generated docRoot using SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a> and <a href="https://www.jb51.cc/tag/PHP/" target="_blank" >PHP</a>_SELF as: $docRoot");                    }             }            if(!isset($docRoot)){                     $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a>_ROOT still is not set. Starting search 2.");                    if(isset($_SERVER['PATH_TRANSLATED'])){                            $docRoot = str_replace( '\',substr(str_replace('\\','\',$_SERVER['PATH_TRANSLATED']),"Generated docRoot using PATH_TRANSLATED and <a href="https://www.jb51.cc/tag/PHP/" target="_blank" >PHP</a>_SELF as: $docRoot");                    }             }            if($docRoot &amp;&amp; $_SERVER['<a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a>_ROOT'] != '/'){ $docRoot = preg_replace('/\/$/',$docRoot); }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Doc root is: " . $docRoot);            $this->docRoot = $docRoot;    }    protected function getLoca<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>magePath($src){            $src = ltrim($src,'/'); //strip off the leading '/'            if(! $this->docRoot){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"We have no <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root set,so as a last resort,lets check if the image is in the current dir and serve that.");                    //We don't support serving images outs<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>e the current dir if we don't have a doc root for s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> reasons.                    $<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = preg_replace('/^.*?([^\/\\]+)$/','',$src); //strip off any path info and just leave the <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>.                    if(is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                            return $this->realpath($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    }                    return $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not find your website <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root and the <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d doesn't exist in timthumbs directory. We don't support serving <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>s outs<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>e timthumb's directory without a <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root for s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> reasons.");            } else if ( ! is_dir( $this->docRoot ) ) {                    $this->error("Server path does not exist. Ensure variable $_SERVER['<a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a>_ROOT'] is set correctly");            }            //Do not go past this point without docRoot set            //Try src under docRoot            if(<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_exists ($this->docRoot . '/' . $src)) {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Found <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> as " . $this->docRoot . '/' . $src);                    $real = $this->realpath($this->docRoot . '/' . $src);                    if(stripos($real,$this->docRoot) === 0){                            return $real;                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"S<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> block: The <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d occurs outs<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>e the <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root.");                            //allow search to continue                    }            }            //Check <a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a> paths and then verify the real path is under doc root            $<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a> = $this->realpath('/' . $src);            if($<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a> &amp;&amp; <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_exists($<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a>)){ //realpath does <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_exists check,so can probably skip the exists check here                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Found <a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a> path: $<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a>");                    if(! $this->docRoot){ $this->sanityFail("docRoot not set when checking <a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a> path."); }                    if(stripos($<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a>,$this->docRoot) === 0){                            return $<a href="https://m.jb51.cc/tag/absolute/" target="_blank" >absolute</a>;                    } else {                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"S<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> block: The <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d occurs outs<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>e the <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root.");                            //and continue search                    }            }            $base = $this->docRoot;            // account for <a href="https://m.jb51.cc/tag/windows/" target="_blank" >windows</a> directory structure            if (strstr($_SERVER['SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>'],':')) {                    $sub_director<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s = explode('\',str_replace($this->docRoot,$_SERVER['SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>']));            } else {                    $sub_director<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s = explode('/',$_SERVER['SCRIPT_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a><a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>']));            }            foreach ($sub_director<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>s as $sub){                    $base .= $sub . '/';                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Trying <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> as: " . $base . $src);                    if(<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_exists($base . $src)){                            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Found <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> as: " . $base . $src);                            $real = $this->realpath($base . $src);                            if(stripos($real,$this->realpath($this->docRoot)) === 0){                                    return $real;                            } else {                                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(1,"S<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a> block: The <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d occurs outs<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>e the <a href="https://m.jb51.cc/tag/document/" target="_blank" >document</a> root.");                                    //And continue search                            }                    }            }            return false;    }    protected function realpath($path){            //try to remove any <a href="https://m.jb51.cc/tag/relative/" target="_blank" >relative</a> paths            $remove_<a href="https://m.jb51.cc/tag/relative/" target="_blank" >relative</a>s = '/\w+\/\.\.\//';            while(preg_match($remove_<a href="https://m.jb51.cc/tag/relative/" target="_blank" >relative</a>s,$path)){                $path = preg_replace($remove_<a href="https://m.jb51.cc/tag/relative/" target="_blank" >relative</a>s,$path);            }            //if any remain use <a href="https://www.jb51.cc/tag/PHP/" target="_blank" >PHP</a> realpath to strip them out,otherwise return $path            //if using realpath,any sym<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>s will also be res<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ved            return preg_match('#^\.\./|/\.\./#',$path) ? realpath($path) : $path;    }    protected function toDelete($<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Schedu<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ng <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> $<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a> to delete on destruct.");            $this->toDeletes[] = $<a href="https://m.jb51.cc/tag/name/" target="_blank" >name</a>;    }    protected function serveWebshot(){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Starting serveWebshot");            $instr = "Please f<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>low the instructions at <a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>://code.<a href="https://m.jb51.cc/tag/Google/" target="_blank" >Google</a>.com/p/timthumb/ to set your server up for taking website screenshots.";            if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>(WEBSHOT_CUTYCAPT)){                    return $this->error("CutyCapt is not installed. $instr");            }            if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>(WEBSHOT_XVFB)){                    return $this->Error("Xvfb is not installed. $instr");            }            $cuty = WEBSHOT_CUTYCAPT;            $xv = WEBSHOT_XVFB;            $screenX = WEBSHOT_SCREEN_X;            $screenY = WEBSHOT_SCREEN_Y;            $c<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>Depth = WEBSHOT_<a href="https://m.jb51.cc/tag/color/" target="_blank" >color</a>_DEPTH;            $format = WEBSHOT_IMAGE_FORMAT;            $timeout = WEBSHOT_TIMEOUT * 1000;            $ua = WEBSHOT_USER_AGENT;            $<a href="https://m.jb51.cc/tag/Js/" target="_blank" >Js</a>On = WEBSHOT_<a href="https://m.jb51.cc/tag/JavaScript/" target="_blank" >JavaScript</a>_ON ? 'on' : 'off';            $javaOn = WEBSHOT_JAVA_ON ? 'on' : 'off';            $pluginsOn = WEBSHOT_PLUGINS_ON ? 'on' : 'off';            $proxy = WEBSHOT_PROXY ? ' --<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>-proxy=' . WEBSHOT_PROXY : '';            $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = tempnam($this->cacheDirectory,'timthumb_webshot');            $url = $this->src;            if(! preg_match('/^<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>s?:\/\/[a-zA-Z0-9\.\-]+/i',$url)){                    return $this->error("Inval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> URL suppl<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d.");            }            $url = preg_replace('/[^A-Za-z0-9\-\.\_:\/\?\&amp;\+\;\=]+/',$url); //RFC 3986 plus ()$ chars to prevent exploit below. Plus the f<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>lowing are also removed: @*!~#[]',// 2014 update by Mark Maunder: This exploit: <a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>://cxs<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>.com/issue/WLB-2014060134            // uses the $(command) shell execution <a href="https://www.jb51.cc/tag/Syntax/" target="_blank" >Syntax</a> to execute arbitrary shell commands as the web server user.             // So we're <a href="https://www.jb51.cc/tag/Now/" target="_blank" >Now</a> filtering out the ch<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>cters: '$','(' and ')' in the above regex to avo<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> this.             // We are also filtering out chars rarely used in URLs but le<a href="https://www.jb51.cc/tag/gal/" target="_blank" >gal</a> accoring to the URL RFC which might be exploi<a href="https://m.jb51.cc/tag/table/" target="_blank" >table</a>. These include: @*!~#[]',// We're doing this because we're passing this URL to the shell and need to make very sure it's not going to execute arbitrary commands.             if(WEBSHOT_XVFB_RUNNING){                    putenv('<a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>PLAY=:100.0');                    $command = "$cuty $proxy --max-wait=$timeout --user-agent=\"$ua\" --<a href="https://m.jb51.cc/tag/JavaScript/" target="_blank" >JavaScript</a>=$<a href="https://m.jb51.cc/tag/Js/" target="_blank" >Js</a>On --java=$javaOn --plugins=$pluginsOn --<a href="https://m.jb51.cc/tag/Js/" target="_blank" >Js</a>-can-open-<a href="https://m.jb51.cc/tag/windows/" target="_blank" >windows</a>=off --url=\"$url\" --out-format=$format --out=$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>";            } else {                    $command = "$xv --server-args=\"-screen 0,{$screenX}x{$screenY}x{$c<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>Depth}\" $cuty $proxy --max-wait=$timeout --user-agent=\"$ua\" --<a href="https://m.jb51.cc/tag/JavaScript/" target="_blank" >JavaScript</a>=$<a href="https://m.jb51.cc/tag/Js/" target="_blank" >Js</a>On --java=$javaOn --plugins=$pluginsOn --<a href="https://m.jb51.cc/tag/Js/" target="_blank" >Js</a>-can-open-<a href="https://m.jb51.cc/tag/windows/" target="_blank" >windows</a>=off --url=\"$url\" --out-format=$format --out=$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>";            }            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Executing command: $command");            $out = `$command`;            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Received output: $out");            if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>();                    return $this->error("The command to create a <a href="https://m.jb51.cc/tag/thumbnail/" target="_blank" >thumbnail</a> <a href="https://www.jb51.cc/tag/Failed/" target="_blank" >Failed</a>.");            }            $this->crop<a href="https://m.jb51.cc/tag/top/" target="_blank" >top</a> = true;            if($this->processImageAn<a href="https://m.jb51.cc/tag/DW/" target="_blank" >DW</a>rit<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>Cache($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Image processed succesf<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>ly. Serving from cache");                    return $this->serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>();            } else {                    return false;            }    }    protected function serveExterna<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mage(){            if(! preg_match('/^<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>s?:\/\/[a-zA-Z0-9\-\.]+/i',$this->src)){                    $this->error("Inval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> URL suppl<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d.");                    return false;            }            $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> = tempnam($this->cacheDirectory,'timthumb');            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Fetching external image into temporary <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>");            $this->toDelete($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            #fetch <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> here            if(! $this->getURL($this->src,$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    <a href="https://m.jb51.cc/tag/touch/" target="_blank" >touch</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Error fetching URL: " . $this->lastURLError);                    $this->error("Error reading the URL you specif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d from remote host." . $this->lastURLError);                    return false;            }            $mimeType = $this->getMimeType($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if(! preg_match("/^image\/(?:jpg|jpeg|gif|png)$/i",$mimeType)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Remote <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> has inval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> mime type: $mimeType");                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    <a href="https://m.jb51.cc/tag/touch/" target="_blank" >touch</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    $this->error("The remote <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> is not a val<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a> image. Mimetype = '" . $mimeType . "'" . $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    return false;            }            if($this->processImageAn<a href="https://m.jb51.cc/tag/DW/" target="_blank" >DW</a>rit<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>Cache($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Image processed succesf<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>ly. Serving from cache");                    return $this->serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>();            } else {                    return false;            }    }    pub<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>c static function curlWrite($h,$d){            fwrite(self::$curlFH,$d);            self::$curlDataWritten += strlen($d);            if(self::$curlDataWritten > MAX_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_SIZE){                    return 0;            } else {                    return strlen($d);            }    }    protected function serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>(){            $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Serving {$this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>}");            if(! is_<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>)){                    $this->error("serveCache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> called in timthumb but we <a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a>n't find the cached <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");                    return false;            }            $fp = fopen($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,'rb');            if(! $fp){ return $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not open cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>."); }            fseek($fp,strlen($this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>PrependS<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Block),SEEK_SET);            $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type = fread($fp,3);            fseek($fp,3,SEEK_CUR);            if(ftell($fp) != strlen($this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>PrependS<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Block) + 6){                    @un<a href="https://m.jb51.cc/tag/link/" target="_blank" >link</a>($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);                    return $this->error("The cached image <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> seems to be corrupt.");            }            $imageDataSize = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) - (strlen($this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>PrependS<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Block) + 6);            $this->sendImage<a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>s($<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>Type,$imageDataSize);            $bytesSent = @fpa<a href="https://www.jb51.cc/tag/sst/" target="_blank" >sst</a>hru($fp);            fclose($fp);            if($bytesSent > 0){                    return true;            }            $content = <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_get_contents ($this->cache<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if ($content != FALSE) {                    $content = substr($content,strlen($this-><a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>PrependS<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Block) + 6);                    echo $content;                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Served using <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_get_contents and echo");                    return true;            } else {                    $this->error("Cache <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> <a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not be loaded.");                    return false;            }    }    protected function sendImage<a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>s($mimeType,$dataSize){            if(! preg_match('/^image\//i',$mimeType)){                    $mimeType = 'image/' . $mimeType;            }            if(strt<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>ower($mimeType) == 'image/jpg'){                    $mimeType = 'image/jpeg';            }            $gmdate_expires = gmdate ('D,strtotime ('<a href="https://www.jb51.cc/tag/Now/" target="_blank" >Now</a> +10 days')) . ' GMT';            $gmdate_modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d = gmdate ('D,d M Y H:i:s') . ' GMT';            // send content <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>s then <a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>play image            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Content-Type: ' . $mimeType);            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Accept-Ranges: none'); //Changed this because we don't accept range requests            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Last-Modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d: ' . $gmdate_modif<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>d);            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Content-Length: ' . $dataSize);            if(<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>WSER_CACHE_<a href="https://www.jb51.cc/tag/dis/" target="_blank" >dis</a>ABLE){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>wser cache is <a href="https://m.jb51.cc/tag/Disabled/" target="_blank" >Disabled</a> so setting non-caching <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>s.");                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Cache-Contr<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>: no-store,time()));            } else {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"<a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>wser caching is enabled");                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Cache-Contr<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>: max-age=' . <a href="https://www.jb51.cc/tag/bro/" target="_blank" >bro</a>WSER_CACHE_MAX_AGE . ',must-reval<a href="https://m.jb51.cc/tag/ID/" target="_blank" >ID</a>ate');                    <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>('Expires: ' . $gmdate_expires);            }            return true;    }    protected function s<a href="https://www.jb51.cc/tag/ecurity/" target="_blank" >ecurity</a>Checks(){    }    protected function p<a href="https://www.jb51.cc/tag/ara/" target="_blank" >ara</a>m($property,$defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t = ''){            if (isset ($_GET[$property])) {                    return $_GET[$property];            } else {                    return $defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t;            }    }    protected function openImage($mimeType,$src){            switch ($mimeType) {                    case 'image/jpeg':                            $image = imagecreatefromjpeg ($src);                            break;                    case 'image/png':                            $image = <a href="https://www.jb51.cc/tag/imagecreatefrompng/" target="_blank" >imagecreatefrompng</a> ($src);                            image<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a>blending( $image,true );                            imagesave<a href="https://m.jb51.cc/tag/Alpha/" target="_blank" >Alpha</a>( $image,true );                            break;                    case 'image/gif':                            $image = imagecreatefromgif ($src);                            break;                    defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t:                            $this->error("Unrecognised mimeType");            }            return $image;    }    protected function getIP(){            $rem = @$_SERVER["REMOTE_ADDR"];            $ff = @$_SERVER["<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_X_FORWARDED_FOR"];            $ci = @$_SERVER["<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_CL<a href="https://m.jb51.cc/tag/IE/" target="_blank" >IE</a>NT_IP"];            if(preg_match('/^(?:192\.168|172\.16|10\.|127\.)/',$rem)){                     if($ff){ return $ff; }                    if($ci){ return $ci; }                    return $rem;            } else {                    if($rem){ return $rem; }                    if($ff){ return $ff; }                    if($ci){ return $ci; }                    return "UNK<a href="https://www.jb51.cc/tag/Now/" target="_blank" >Now</a>N";            }    }    protected function de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>($level,$msg){            if(DE<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>_ON &amp;&amp; $level <= DEBUG_LEVEL){                    $execTime = sprintf('%.6f',microtime(true) - $this->startTime);                    $tick = sprintf('%.6f',0);                    if($this->lastBenchTime > 0){                            $tick = sprintf('%.6f',microtime(true) - $this->lastBenchTime);                    }                    $this->lastBenchTime = microtime(true);                    error_log("TimThumb De<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a> <a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ne " . __<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>NE__ . " [$execTime : $tick]: $msg");            }    }    protected function sanityFail($msg){            return $this->error("There is a problem in the timthumb code. Message: Please report this error at <a href='http://code.google.com/p/timthumb/issues/list'>timthumb's bug tracking page</a>: $msg");    }    protected function getMimeType($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>){            $info = ge<a href="https://www.jb51.cc/tag/timage/" target="_blank" >timage</a>size($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if(is_array($info) &amp;&amp; $info['mime']){                    return $info['mime'];            }            return '';    }    protected function setMemory<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mit(){            $inimem = ini_get('memory_<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>mit');            $inibytes = timthumb::returnBytes($inimem);            $ourbytes = timthumb::returnBytes(MEMORY_<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>MIT);            if($inibytes < $ourbytes){                    ini_set ('memory_limit',MEMORY_LIMIT);                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Increased memory from $inimem to " . MEMORY_<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>MIT);            } else {                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Not adjusting memory size because the current setting is " . $inimem . " and our size of " . MEMORY_<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>MIT . " is smaller.");            }    }    protected static function returnBytes($size_str){            switch (substr ($size_str,-1))            {                    case 'M': case 'm': return (int)$size_str * 1048576;                    case 'K': case 'k': return (int)$size_str * 1024;                    case 'G': case 'g': return (int)$size_str * 1073741824;                    defa<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t: return $size_str;            }    }    protected function getURL($url,$temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>){            $this->lastURLError = false;            $url = preg_replace('/ /','%20',$url);            if(function_exists('curl_init')){                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Curl is installed so using it to fetch URL.");                    self::$curlFH = fopen($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,'w');                    if(! self::$curlFH){                            $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not open $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a> for writing.");                            return false;                    }                    self::$curlDataWritten = 0;                    $this->de<a href="https://m.jb51.cc/tag/BUG/" target="_blank" >BUG</a>(3,"Fetching url with curl: $url");                    $curl = curl_init($url);                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_TIMEOUT,CURL_TIMEOUT);                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_USERAGENT,"Mozilla/5.0 (<a href="https://m.jb51.cc/tag/windows/" target="_blank" >windows</a> NT 6.1) AppleWebKit/534.30 (K<a href="https://m.jb51.cc/tag/HTML/" target="_blank" >HTML</a>,<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>ke Gecko) <a href="https://m.jb51.cc/tag/Chrome/" target="_blank" >Chrome</a>/12.0.742.122 Safari/534.30");                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_RETURNTRANSFER,TRUE);                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_<a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a>,0);                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_SSL_VERIFYPEER,FALSE);                    curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_WRITEFUNCTION,'timthumb::curlWrite');                    @curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_F<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>LOWLOCATION,true);                    @curl_s<a href="https://www.jb51.cc/tag/eto/" target="_blank" >eto</a>pt ($curl,CURLOPT_MAXRED<a href="https://www.jb51.cc/tag/irs/" target="_blank" >irs</a>,10);                    $curlRes<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t = curl_exec($curl);                    fclose(self::$curlFH);                    $<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>Status = curl_getinfo($curl,CUR<a href="https://m.jb51.cc/tag/li/" target="_blank" >li</a>NFO_<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>_CODE);                    if($<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>Status == <a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>){                            $this->set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>();                    }                    if($<a href="https://m.jb51.cc/tag/http/" target="_blank" >http</a>Status == 302){                            $this->error("External Image is Redirecting. Try alternate image url");                            return false;                    }                    if($curlRes<a href="https://m.jb51.cc/tag/ul/" target="_blank" >ul</a>t){                            curl_close($curl);                            return true;                    } else {                            $this->lastURLError = curl_error($curl);                            curl_close($curl);                            return false;                    }            } else {                    $<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a> = @<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_get_contents ($url);                    if($<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a> === false){                            $err = error_get_last();                            if(is_array($err) &amp;&amp; $err['message']){                                    $this->lastURLError = $err['message'];                            } else {                                    $this->lastURLError = $err;                            }                            if(preg_match('/<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>/',$this->lastURLError)){                                    $this->set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>();                            }                            return false;                    }                    if(! <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_put_contents($temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>,$<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>)){                            $this->error("<a href="https://www.jb51.cc/tag/Could/" target="_blank" >Could</a> not write to $temp<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>.");                            return false;                    }                    return true;            }    }    protected function serve<a href="https://m.jb51.cc/tag/img/" target="_blank" >img</a>($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>){            $s = ge<a href="https://www.jb51.cc/tag/timage/" target="_blank" >timage</a>size($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if(! ($s &amp;&amp; $s['mime'])){                    return false;            }            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Content-Type: ' . $s['mime']);            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Content-Length: ' . <a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>size($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>) );            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ('Cache-Contr<a href="https://m.jb51.cc/tag/ol/" target="_blank" >ol</a>: no-store,max-age=0');            <a href="https://m.jb51.cc/tag/header/" target="_blank" >header</a> ("Pragma: no-cache");            $bytes = @read<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if($bytes > 0){                    return true;            }            $content = @<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>_get_contents ($<a href="https://m.jb51.cc/tag/file/" target="_blank" >file</a>);            if ($content != FALSE){                    echo $content;                    return true;            }            return false;    }    protected function set<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>(){            $this->is<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a> = true;    }    protected function is<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>(){            return $this->is<a href="https://www.jb51.cc/tag/404/" target="_blank" >404</a>;    }

}

总结

以上是内存溢出为你收集整理的为您的主题增加美女图片展示功能全部内容,希望文章能够帮你解决为您的主题增加美女图片展示功能所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/1025665.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存