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.
<?php
echo("hallo");
function Umrandung($imm, $farbe, $breite, $hoehe) {
ImageLine ($imm, 0, 0, 0, $hoehe-1, $farbe);
ImageLine ($imm, 0, 0, $breite-1, 0, $farbe);
ImageLine ($imm, $breite-1, 0, $breite-1, $hoehe-1, $farbe);
ImageLine ($imm, 0, $hoehe-1, $breite-1, $hoehe-1, $farbe);
}
function logo_brand($src, $logo, $quality = 100) {
$info = getimagesize($src);
if ($info[0] > 1) {
$logo_size = getimagesize($logo);
$logo = imagecreatefromjpeg($logo);
$bild = imagecreatefromjpeg($src);
imagecopy($bild, $logo, 175, 60, 0, 0, $logo_size[0], $logo_size[1]);
imagejpeg($bild, $src, $quality);
return TRUE;
} else return FALSE;
}
include('../daten.php');
$conn_id = mysql_connect('localhost',web1',$mysqlpass);
mysql_select_db('usr_web1_1',$conn_id);
$result = mysql_query("SELECT * FROM grafik WHERE user = 'Alex'")
or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$BB = "280";
$HH = "95";
$im = @ImageCreate ($BB, $HH)
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 236, 240, 243);
$black = imagecolorallocate($im, 0, 0, 0);
$blue = imagecolorallocate($im, 0, 85, 153);
ImageString($im, 2, 5, 5, 'Uptime', $blue);
ImageString($im, 1, 5, 20, $row['uptime'], $black);
ImageString($im, 2, 5, 35, 'Festplattenplatz belegt', $blue);
ImageString($im, 1, 5, 50, $row['festplatte'].' %', $black);
ImageString($im, 2, 5, 65, 'Prozessor', $blue);
ImageString($im, 1, 5, 80, $row['prozessor'], $black);
$SW = ImageColorAllocate($im, 0, 0, 0);
Umrandung($im, $SW, $BB, $HH);
ImageJPEG ($im,"mygfx.jpg",100);# bild wird erstlt und gesendet
logo_brand("mygfx.jpg", "status.jpg");
ImageDestroy($im);
}
mysql_close($conn_id);
?>
Unable to open 'mygfx.jpg' for writing