Solved: Auto-Rotate Pictures - smartphones
I was looking at some code this afternoon and for some way to change the stupid default picture of my RIM Blackberry (ie: vodafone), then I find this company which propose a software which basically allow you to see pictures through the internet on your blackberry - so you can use it for security purpose-
You must be kidding me!
I'm no guru of PHP but that's just piss taking!
Here goes, a PHP code which allow you to either refresh the same picture from a know source , or to rotate pictures from your website on whatever smartphone - PC - mac etc...
So if you want to use it for "secuirty" purpose, just buy a quickcam with an auto upload and job done!
For Rotating pictures:
Rotate.php
<html>
<head>
</head>
<body>
<img border="1" src="pic1.jpg" align="middle">
<?php
$NumberOfPictures=8;
$Pval=$NumberOfPictures+1;
$Picname="pic".$Pval.".jpg";
rename("pic1.jpg",$Picname);
for ($i=1; $i<=$NumberOfPictures; $i++)
{
$Pval=$i+1;
$Picname1="pic".$Pval.".jpg";
$Picname2="pic".$i.".jpg";
rename($Picname1,$Picname2);
}
?>
<meta http-equiv="refresh" content="10; URL=Rotate.php">
</body>
</html>
The pictures must be called pic1.jpg, pic2.jpg, pic3.jpg etc...
then adjust $NumberOfPictures to the amount of pictures
For the "security" (you will need a LOT of light for the QUickcam to pickup anything > 2 metres! prob good for outside cam)
Security.htm
<html>
<head>
</head>
<body>
<img border="1" src="pic1.jpg" align="middle">
<meta http-equiv="refresh" content="30; URL=Security.htm">
</body>
</html>
content="30 <- refresh every 30 seconds
That's that sorted - now if anyone know how to change that vodafone pic!! let me know!
|