"failed", "took" => microtime(true) - $took])); return; } $ret = ["status" => "ok", "type" => "raw", "width" => $matches[3] ?? 0, "height" => $matches[4] ?? 0]; if (strpos($matches[2], "image") === 0) { $ret["type"] = "image"; } else if (strpos($matches[2], "audio") === 0) { $ret["type"] = "audio"; } else if (strpos($matches[2], "video") === 0) { $ret["type"] = "video"; } $ret["url"] = urldecode($matches[1]); die(json_encode($ret));