Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2005, 09:52 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!









Similar Threads
Thread Thread Starter Forum Replies Last Post
How rotate Text in HTML Table Rahul Gupta ASP.NET 2.0 Professional 3 October 17th, 2007 11:58 PM
rotate text inm45 degrees. surendran Javascript How-To 1 January 25th, 2007 05:55 AM
Rotate a report by 90 degrees csecharith Beginning VB 6 1 January 15th, 2007 02:20 PM
Rotate Text surendran Javascript How-To 3 December 18th, 2006 02:08 AM
rotate text 90 degrees lcsgeek Classic ASP Databases 2 September 15th, 2003 10:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.