URNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result_json = curl_exec($ch); try { $result = xn_json_decode($result_json); if (isset($result['success_' . $type])) $status = '成功'; else $status = $result['message']; foreach ($tid_arr as $_tid) db_insert('seo_log', array('time' => time(), 'type' => 3, 'uid' => $uid, 'status' => $status, 'tid' => $_tid)); return $status; } catch (Exception $e) { return '推送错误'; } } function MipFormat($content) { preg_match_all('//', $content, $images); if (!is_null($images)) { foreach ($images[1] as $index => $value) { $mip_img = str_replace('', '>', $mip_img); $mip_img = preg_replace('/ (height|width)=\".*?\"/', '', $mip_img); $mip_img = preg_replace('/ style=\".*?\"/', '', $mip_img); $mip_img = preg_replace('/ class=\".*?\"/', '', $mip_img); $content = str_replace($images[0][$index], $mip_img, $content); } } $content = preg_replace('/]*>/', '', $content); $content = preg_replace('/]*>/', '
', $content); $content = preg_replace('/]*>/', '

', $content); $content = preg_replace('/]*>/', '', $content); return $content; } ?>