You need to adjust the following file (follow the TODO clues)
and to upload it under the name "
latest.php
" on the server
you will access to using the spEye iOS app.
/* Find all of the TODO comments hereafter and follow them. You'll be fine */ /* TODO: Adjust the following glob statements to get your pictures from several directories on this servers */ $files = glob("viewz/*.jpg") + glob("viewz/????/??/??/*.jpg"); /* /TODO */ $files = array_combine(array_map("filemtime", $files), $files); krsort($files); /* TODO: Give your server base url, he will generate the pictures URLs based on this */ $baseurl="http://speye.zooz.ch/"; /* /TODO */ if ($_GET["action"] === "newer" ) { $file = $_GET["than"]; if (strlen($file) > 5) { $pathf=explode("/", $file); $leaff=array_pop($pathf); $i=0; foreach ($files as $key => $val) { $pathv=explode("/", $val); $leafv=array_pop($pathv); if (strcmp($leaff, $leafv) == 0) { break; } $i++; } } echo "
" . $i . "
\n"; } else { $MAX = $_GET["count"]; if (!is_numeric($MAX)) { $MAX=100; } $i=0; foreach ($files as $key => $val) { $path=explode("/", $val); $leaf=array_pop($path); /* TODO: If you have several cameras, you can get this script to identify them based on a part of their file names... If you have just one cam, just replace all of this with a line containing: $what="WHAT_YOU_WANT"; */ if (stristr($leaf,"Entree_prefix")) { $what="Entree"; } else if (stristr($leaf,"Escalier_prefix.")) { $what="Escalier"; } else if (stristr($leaf,"DLINK_CAM_UPLOAD_")) { $what="Palier"; } else if (stristr($leaf,"VTC7BHJP8763MNTFD_")) { $what="Chambre"; } else if (stristr($leaf,"HSL-WQE345-YZJTK_")) { $what="Salon"; } else { $what="Chattes"; } /* /TODO */ echo "
" . $i++ . "
" . date("Y/m/d H:i:s", $key) . "
" . $baseurl . $val . "
" . $what . "
\n"; if ($i >= $MAX) { break; } } } ?>