Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
//Determine current URL
$URL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
//Decode and clean URL
$URL = urldecode ($URL);
$URL = str_replace ('&', '&', $URL);
//Check if PHP is not in safe mode,
//and PHPSESSID is passed via URL
if (!ini_get ('safe_mode') && preg_match ('#'.session_name().'=([^=&\s]*)#i', $URL))
{
//Remove PHPSESSID junk and unneeded characters ("&" or "?") at end of URL
$URL = preg_replace ( array ('#(\?|&)'.session_name().'=([^=&\s]*)#', '#(&|\?)+$#'), '', $URL);
//Send Moved Permanently header
@ header ("HTTP/1.1 301 Moved Permanently");
//Redirect to clean URL
@ header ("Location: " . trim ($URL));
//End current script
exit();
}
//Check if PHP is not in safe mode,
//and PHPSESSID is passed via URL
if (!ini_get ('safe_mode') && preg_match ('#'.session_name().'=([^=&\s]*)#i', $URL))
{
//Remove PHPSESSID junk and unneeded characters ("&" or "?") at end of URL
$URL = preg_replace ( array ('#(\?|&)'.session_name().'=([^=&\s]*)#', '#(&|\?)+$#'), '', $URL);
//Send Moved Permanently header
@ header ("HTTP/1.1 301 Moved Permanently");
//Redirect to clean URL
@ header ("Location: " . trim ($URL));
//End current script
exit();
}