Erkens.info

AnalogClock

Een PHP script om een analoge klok weer te geven.

http://www.erkens.info/files/klok/klok.php?size=100&bg=00FF00&fg=FF00FFhttp://www.erkens.info/files/klok/klok.php?size=100&bg=000000&fg=00FFFFhttp://www.erkens.info/files/klok/klok.php?size=100&bg=FF0000&fg=FFFF00http://www.erkens.info/files/klok/klok.php?size=100&bg=FFFFFF&fg=000000

http://www.erkens.info/files/klok/klok.php?size=10&bg=00FF00&fg=FF00FFhttp://www.erkens.info/files/klok/klok.php?size=10&bg=000000&fg=00FFFFhttp://www.erkens.info/files/klok/klok.php?size=10&bg=FF0000&fg=FFFF00http://www.erkens.info/files/klok/klok.php?size=10&bg=FFFFFF&fg=000000


Het is een simpele PHP class file welke eenvoudig te gebruiken is. Zie het volgende voorbeeld:
$klok = new AnalogClock(25,'FF0000','0000FF');
$klok->setTime(date('g'),date('i'));
$klok->createPNG();

Hiermee krijg je het volgend plaatje: http://www.erkens.info/files/klok/klok.php?size=25&bg=FF0000&fg=0000F

De class-file zelf kan je hier download:

analogclock.class.php [view] - [download]

AnalogPHPClock, A PHP-class which produces an image of a analog clock.
Copyright (C) 2005, Michael Erkens

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the 
Free Software Foundation, Inc., 
51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA


Plaats een reactie