Is there a way to check if a cakePHP action is being called from an swf/flash movie like there is for Ajax using the requestHandler?
A:
I don't believe so. A better option might be to create discrete controller actions that you only use from your Flash app.
inkedmn
2009-12-22 21:18:40
A:
Not the way I think you mean. The requestHandler
can detect the type of request, but I think you're looking for the request source. It might be worth trying the getReferrer()
method, but you may end up needing to add a click handler to the swf (if it's yours and you have that access).
Rob Wilkerson
2009-12-22 21:24:24
A:
Put a named parameter in the URL that Flash is requesting:
eg. http://www.example.com/controller/action/flash:true
Check for this named parameter in your controller (or AppController) code:
if (isset($this->params['named']['flash'])) {
...
}
deizel
2009-12-24 13:00:14