0
votes

this is my as3 code to get time from server:

var date_loader:URLLoader = new URLLoader();
var date_urlreq:URLRequest = new URLRequest("http://ixfa08.gigfa.com/mytime.php");
date_loader.load(date_urlreq);
date_loader.addEventListener(Event.COMPLETE, onServerTimeLoad);
function onServerTimeLoad(e:Event)
{
    trace(date_loader.data);    
}

and this is my php code:

<?php
print time();
?>

and this is the result after trace in flash cs6:

<html><body><h2>Checking your browser..<h2><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("d753a2b8b06e14eaba68f691c541eff7");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/";location.href="http://ixfa08.gigfa.com/mytime.php?ckattempt=1";</script></body></html>

where is my mistake ? I want get server time from php

1

1 Answers

0
votes

looks like your server returns wrong data, due to free hosting specifics (if you have only <?php echo time(); in mytime.php file)
Your code looks ok ;)