Hi … ich hab bei mir das zwar in einer PHP Klasse, aber hier mal eine Version die ohne OOP auskommt.
Das Homeegramm ruft eine URL auf meinem Webserver auf: Das ist dann mein Webhook
Z.B. http://demoDomain.de/homee/webcam/webhook.php
Und hier ein Auszug aus dem Inhalt…
<?php
$webCamSnapshot = 'http://demoDomain.de:1234/snapshot.jpg?user=xxx&pwd=yyyy';
$imageContent = file_get_contents($webCamSnapshot);
file_put_contents('/homee/webcam/pics/current.jpg', $imageContent);
sendMail($image);
function sendMail($image) {
$mail = new Email();
$msg = '<img src="http://demoDomain.de/homee/webcam/pics/current.jpg">';
$mail->send('homee', 'max@mustermann.de', 'Haustür Info', $msg);
}
?>
Grüße
Günni