let browser determine http/https
This commit is contained in:
parent
34705ff259
commit
426c938bd0
1 changed files with 2 additions and 2 deletions
|
|
@ -30,11 +30,11 @@ if (!empty($_GET['url'])) {
|
|||
|
||||
file_put_contents($hashfilepath, $url);
|
||||
|
||||
$shortUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?'.$urlhash;
|
||||
$shortUrl = $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?'.$urlhash;
|
||||
|
||||
$qrcode = (new QrCode())->setText($shortUrl);
|
||||
|
||||
$content = '<a href="'.$shortUrl.'">'.$shortUrl.'</a><br>'
|
||||
$content = '<a href="//'.$shortUrl.'">'.$shortUrl.'</a><br>'
|
||||
.'<img src="data:'.$qrcode->getContentType().';base64,'.base64_encode($qrcode->get()).'">';
|
||||
} elseif (!empty($_GET)) {
|
||||
$urlhash = key($_GET);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue