Add http:// to links that aren't http or https

This is for people who forget that first part of the url
This commit is contained in:
Arctic Code 2013-08-26 10:12:42 -05:00
parent 4807406cdf
commit d3d8302f94
1 changed files with 3 additions and 0 deletions

View File

@ -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":