Example #1
0
function updateimg($date, $filename)
{
    if (!empty($_SERVER['HTTP_APPNAME'])) {
        $weburl = saeup($date, $filename);
    } else {
        $weburl = commenup($date, $filename);
    }
    return $weburl;
}
Example #2
0
function makeimg($picurl, $webpath)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $picurl);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    // 对认证证书来源的检查
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    // 从证书中检查SSL加密算法是否存在
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36");
    $output = curl_exec($ch);
    curl_close($ch);
    if (!empty($_SERVER['HTTP_APPNAME'])) {
        $weburl = saeup($output);
    } else {
        $weburl = commenup($output, $webpath);
    }
    return $weburl;
}