false, 'msg' => '缺少网址'], JSON_UNESCAPED_UNICODE); exit; } $meta = fetch_site_meta($url); $domain = domain_of($meta['final_url'] ?: $url); $iconFile = download_best_icon($meta['icons'], $domain); $name = $meta['name'] !== '' ? $meta['name'] : ($meta['title'] !== '' ? $meta['title'] : $domain); echo json_encode([ 'ok' => true, 'url' => $url, 'final_url' => $meta['final_url'], 'name' => $name, 'short' => $name, 'title' => $meta['title'], 'icon' => $iconFile, 'icon_url' => $iconFile !== '' ? icon_src($iconFile) : '', 'candidates' => count($meta['icons']), ], JSON_UNESCAPED_UNICODE);