/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// AS3 code loads the contents of getDate.php var ldr:URLLoader = new URLLoader() ldr.load(new URLRequest("http://www.YOUR-URL.com/getDate.php")) ldr.addEventListener(Event.COMPLETE, onLoaded) function onLoaded(evt:Event){ trace(ldr.data) } // getDate.php sits on a server you can access // and simply outputs the date - the (j) tells it to output the date as a number // check http://uk.php.net/manual/en/function.date.php for more options on the output // script contents below (without the comment slashes of course): //<?php //print "&serverDate=".date(j); //?>