mirror of
https://github.com/gamaio/unps.us-Shortener.git
synced 2024-12-22 02:02:40 +00:00
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:
parent
4807406cdf
commit
d3d8302f94
@ -29,6 +29,9 @@
|
|||||||
switch ($_POST['linkmod']){
|
switch ($_POST['linkmod']){
|
||||||
case "shorten":
|
case "shorten":
|
||||||
$short = sanitize($_POST['link']);
|
$short = sanitize($_POST['link']);
|
||||||
|
if(strpos($short, "http://") === false && strpos($short, "https://") === false){
|
||||||
|
$short = "http://$short";
|
||||||
|
}
|
||||||
echo $unpsAPI->shorten($apidb, $key, $shortdb, $short);
|
echo $unpsAPI->shorten($apidb, $key, $shortdb, $short);
|
||||||
break;
|
break;
|
||||||
case "dellink":
|
case "dellink":
|
||||||
|
Loading…
Reference in New Issue
Block a user