/',$html,$matches); $shortUrl = $matches[1]; curl_close($ch); return $shortUrl; } public function baseUrl() { $base = $_SERVER['REQUEST_URI']; $db = Database::getInstance(); if ($db !== null) { $b = $db->getSysConf('baseurl'); if ($b != false) { $base = $b; } } return $base; } }