I’m on XP Pro by the way…
you have to have apache and php installed locally
Thanks Sen and XXVIII…
*Originally posted by mdipi.com *
**so it is offa a server? or its just a .php file on your system with php installed? **
It’s on aserver!
I tried installing php on my comp but I couldn’t even get Apache installed so… no apache for me!
That clock in the lower right corner isn’t good enough for you Syko?
Hehe… well I guess hovering over it to get the full date can be too much work
No it isn’t! You can never tell if the clock shows the right time but with php I can always be sure! And in addition it shows what what day of the week it is in numbers, what day of the year it is and what week of the year it is! Plus I can see the sconds as well!
oh and mdipi was also right!
If you use Windows XP and you double click the click in the corner you can choose to synchronize your clock with an internet time server
Im not putting down your desktop, do what you want, if you find it easier than great, I think it is quite an interesting idea. It doesn’t bog down your computer at all?
i don’t think so! …well haven’t noticed yet!
It’s a pain to make it in flash! Won’t work!
Clocks in Flash are easy… does it just not work with active desktops?
If thats so, then what about Javascript?
You can do that LIB. All you need to do is put the SWF in some HTML and rock-n-roll.
how did you get it offa the server onto yur dtop? ughh! lol. i gotta get up and go down to the PC to look around. this is still cool though. but i would want other things mostlikely instead. like what my cpu usage was, but you cant do that via PHP
Ok, well I adapted one of my Flash clocks into Javascript if you wish to check it out…
<DIV ID="clock"></DIV>
<SCRIPT LANGAUGE="JavaScript">
<!--
//function to get and print time
function updateTimeValue() {
myTime = new Date();
h = myTime.getHours();
m = myTime.getMinutes();
s = myTime.getSeconds();
h == 12 || h == 0 ? hours=12 : (h%12)<10 ? hours="0"+(h%12) : hours=h%12;
m<10 ? minutes="0"+m : minutes=m;
s<10 ? seconds="0"+s : seconds=s;
h<12 ? amPM="AM" : amPM="PM";
document.getElementById("clock").innerHTML = hours+":"+minutes+":"+seconds+" "+amPM;
};
//run function when page loads
updateTimeValue();
//run function every 1000 milliseconds (1 second)
setInterval(updateTimeValue, 1000);
-->
</SCRIPT>
The div tag in the beginning is what will display the time, it is important you keep that ID at “clock” unless you change it in the script.
There is nothing wrong with the clock but I can’t get the time from a php file be displayed in Flash! Now it’s working… now it isn’t!.. wierd stuff!
I can’t even if lost’s clock working! :-\
dag lost! thats a crazy script! how you do stuff like this i will never know! shesh i cant even read it lol. you are such a crazy scripter.
Syko i had that same problem when i was trying to mm ake my PHP hit counter in flash. it would sometimes display and other times it wouldnt. I think the PHP could be better in flash…maybe for MX II
I think it’s just that Flash and PHP don’t fit together!
and lost - you script in all the languages doncha? =)
but syko what i am saying is that it should, imagine if they did! there would be nop limits! i think that it should be a lot like XML and flash. but i dont know…
Syko: Do you HAVE to do this in PHP??? Flash has the ability to handle time as well (the same way Javascript does).
And no, I don’t code in all languages, although I wish I did…hehe. Only HTML, CSS, Javascript, very little DHTML, and just now getting into PHP/mySQL.
Mdipi: My script isn’t that hard if you know the tertiary operator ( statement ? do this if true : else do this if false ) and modulo (number1%number2, gets the remainded of number1 divided by number2)
I was doing this wif php because flash shows me the same time I have in the lower right corner which can be wrong at any time but i want it to show internet time!
But if you say that it can be changed to show the internet time then I can use that too and make the clock in flash!
*Originally posted by lostinbeta *
**Syko: Do you HAVE to do this in PHP??? Flash has the ability to handle time as well (the same way Javascript does).
And no, I don’t code in all languages, although I wish I did…hehe. Only HTML, CSS, Javascript, very little DHTML, and just now getting into PHP/mySQL.
Mdipi: My script isn’t that hard if you know the tertiary operator ( statement ? do this if true : else do this if false ) and modulo (number1%number2, gets the remainded of number1 divided by number2) **
DHTML is like Javascript… It is just like, CSS + Javascript + HTML.
I <3 Javascript!
yes DHTML is a combination of CSS, Javascript, and HTML, but coding crossbrowser in it is like taking an ax to your own head.
pfft, then do what I do. Put an ASP detection script on your site that says if your not using IE then go download it.