J'ai changé une camera IP (Cam 1), voila la commande qui permet normalement de capturer l'image
http://admin:XXX@192.168.1.18:80/ISAPI/ ... 02/picture
Mais, je suis confronté à un problème.
Depuis l’extérieur ou en local l’image (Cam 1) est absente sur IE11 , Edge ,sur le navigateur Chrome il y a une demande de mot de pass , seul le navigateur Firefox affiche l'image .
Code : Tout sélectionner
// camera
if (LOCAL){ // a partir du reseau local
$cam01_img="snapshot.php";
$cam02_img="http://192.168.1.21:80/snapshot.cgi?user=admin&pwd=admin";
$cam01_lnk="http://192.168.1.18:80/";
$cam02_lnk="http://192.168.1.21:80/";
if (TEST){
$cam01_img="snapshot.php";
$cam02_img="http://".$dynamic_dns.":8082/snapshot.cgi?user=admin&pwd=admin";
$cam01_lnk="http://".$dynamic_dns.":8081/";
$cam02_lnk="http://".$dynamic_dns.":8082/";
}
}
else { // a partir de l'exterieur
$cam01_img="snapshot.php";
$cam02_img="http://".$dynamic_dns.":8082/snapshot.cgi?user=admin&pwd=admin";
$cam01_lnk="http://".$dynamic_dns.":8081/";
$cam02_lnk="http://".$dynamic_dns.":8082/";
}
Code : Tout sélectionner
<?php
if (!defined('LOCAL')) {
if (strpos($_SERVER['REMOTE_ADDR'],"192.168.")!==false) {
$img="http://admin:XXX@192.168.1.18:80/ISAPI/Streaming/channels/102/picture";
}
else {
$img="http://admin:XXXX@bg.ddns.net:8083/ISAPI/Streaming/channels/102/picture";
}
}
header ('content-type: image/jpeg');
readfile($img);
?>
dans mon fichier index.php pour que cela fonctionne .
Merci