From d3d8302f94a2d9071b44de609d5da46d2b4befe4 Mon Sep 17 00:00:00 2001 From: Arctic Code Date: Mon, 26 Aug 2013 10:12:42 -0500 Subject: [PATCH] Add http:// to links that aren't http or https This is for people who forget that first part of the url --- process.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/process.php b/process.php index c65c996..f07afa8 100644 --- a/process.php +++ b/process.php @@ -29,6 +29,9 @@ switch ($_POST['linkmod']){ case "shorten": $short = sanitize($_POST['link']); + if(strpos($short, "http://") === false && strpos($short, "https://") === false){ + $short = "http://$short"; + } echo $unpsAPI->shorten($apidb, $key, $shortdb, $short); break; case "dellink":