Just wondering if there is a way to read class static constants from a SWF file server side. I have found things like getimagesize()
but it doesn't have all these details. I guess that means I need a partial decompiler.
Specifically, I have this class in my Flex project:
package
{
public class AppVersion
{
public static const SVN_VERSION:String = "172";
public function AppVersion()
{
}
}
}
SVN_VERSION
is updated using an ant script on build. AppVersion.SVN_VERSION
is displayed to the user using ActionScript code, so it should be available somewhere in the SWF.
I'd like to be able to read that version from PHP so it knows which version of the SWF it's dealing with. This same SWF is used in about 20 projects, of various revisions, so the PHP will do some things slightly differently depending. The PHP is running on either Mac OSX or Linux, if that makes a difference.
You could send the value to PHP using the following classes:
URLRequest
URLLoader
URLVariables
Would basically just be something like:
And from here you can access the value in PHP via: