host = 'localhost'; // replace 3306 with your database host name; $Ossn->port = '3306'; // replace umojjaco_ossn with your database username; $Ossn->user = 'umojjaco_ossn'; // replace umojjaco_ossn with your database password; $Ossn->password = 'PresseUmojja@#@!1'; // PresseUmojja@#@!1 (umojjaco_ossn) // replace umojjaco_ossn with your database name; $Ossn->database = 'umojjaco_ossn'; ----------------------------------------------------------------------*/ // Database configuration $dbHost = "localhost"; $port = '3306'; $dbUsername = "umojjaco_ossn"; $dbPassword = "PresseUmojja@#@!1"; $dbName = "umojjaco_ossn"; $connection="failed"; try{ $db = new PDO("mysql:host=$dbHost;dbname=$dbName", $dbUsername, $dbPassword); $connection="okay"; }catch(PDOException $e){ $connection="Connection failed: " . $e->getMessage(); } //------------we can access data base $shortener = new Shortener($db); //https://u.umojja.com/?c=gzYN7BK // Retrieve short code from URL ////https://my.umojja.com/?c=oooo $shortcode= $_GET["c"]; $shortcode=strtolower($shortcode); $url = $shortener->shortCodeToUrl($shortcode); if(!empty($url)){ //$url="https://www.iyiebo.com"; header("Location: ".$url); exit; }elseif(empty($url)){ $url="https://www.umojja.com"; //$url="https://www.iyiebo.com"; header("Location: ".$url); exit; } //echo("$connection"); // Redirect to the original URL ?>