Jump to content

Recommended Posts

Why not give it a 5 second lead way and see if that works. So on the flash side, add 5 seconds. Then on the php side check that the time is within 5 seconds of the current time.

 

As far as knowing how long it takes, you simply echo out the time php has minus the time that was received by flash. But I doubt this will be 100% consistent each time, so a 2-5 second lead way may solve that.

ye I already tried that.

but its a validation process. So I need it to be precise.

 

I understand that, but unfortunately flash applications depend on the machine how (quickly) they run. On a brand new machine the time will be different than on an older machine. Since it really depends on the client and the cache size etc. Then there is the time it takes to send the flash data on the server end to PHP, which can also be variable depending on the server load. (At least it would make sense on that).

 

How to solve your issue, I have no clue. As there can be so many variables with the flash end. I mean even PHP scripts run randomly depend on the server load. I can refresh a page of mine that just echo's out "Test" and one time it could take .00004 seconds and the next it takes .00003 seconds. Granted we are talking about micro seconds, but the same will apply. If the time varies each time the script is ran, perhaps you can grab the highest amount of seconds on average it takes to run and the lowest. Use that for validation basis. I do not think, with Flash and PHP, you could get much more accurate.

 

But I am no Flash expert. That just makes logical sense to me.

well I was just thinking maybe there is a why in PHP to know how long it took for itself to be loaded.

Probably not.

 

But you might know a good why of securing a xml file on my server.

You see, i want to load in a xml file with flash. but it must only be accessible buy flash.

So that's why i used php to send me the xml file if the date is valid.

But you might know a good why of securing a xml file on my server.

 

Put it outside of the document root and call it from there.

 

So if your server path is:

/home/user/www/index.php (where index.php is visible)

 

Put the xml files in

/home/user/xml/xmlfiles.xml

 

Then just include the files that way. I am not sure if flash can do that, but it should not have a problem with it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.