View Single Post
Old 11-19-2012, 06:53 AM  
senortriangulo
Registered User
 
Industry Role:
Join Date: Oct 2012
Posts: 53
:2cents

Quote:
Originally Posted by epeters View Post
Any advise how to bar these sites from accessing my site (.php) or code I could add to the games (.swf)? o
If someone is actually copying your SWFS to their server, then this has to be solved on the Flash side. You should be able to do this easily by setting up a crossdomain policy. This will prevent Flash movies from making HTTP requests to your server.

Know that this will prevent any flash apps from calling back to your server that aren't listed in your cross domain policy. Now just create a page on your server, it can be a text file with one word like "OK" or "SUCCESS". We just want to see if the flash app can make the request successfully.

Just use a URL request to retrieve that page. If the SWF is hosted on a server that is not listed in your crossdomain policy, the URLRequest will throw an exception.

You catch the exception and shut the game down, simple as that. You could provide a page in the flash movie that allows you to click back and run the game on your site too.

Simple solution, should take no more than a few lines of code to solve.


-st
senortriangulo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook