Revision: 36966
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 1, 2010 23:13 by weavermedia
Initial Code
// 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);
//?>
Initial URL
Initial Description
Initial Title
AS3 Get the time/date from the server with a simple PHP script
Initial Tags
php
Initial Language
ActionScript 3