Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i know if the request came from flash swf?

I have an application developed in flash, and I need to access some php files. so the php file return some data if the access is came from swf. How can i identify if the request came from flash or not?

without passing get/post variables to php.

like image 572
coderex Avatar asked Jul 23 '10 13:07

coderex


2 Answers

User agent/Referer possibly. Keep in mind that requests can easily be forged

like image 65
Robus Avatar answered Sep 28 '22 07:09

Robus


I don't think there really is a reliable way of detecting whether Flash made the request. Flash doesn't allow you to set the user-agent, and there are a lot of restrictions on what headers can be set.

Take a look at http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/URLRequestHeader.html

as John Ballinger suggested, you could set your own header using this and look for that header in the PHP page.

like image 45
nerdabilly Avatar answered Sep 28 '22 09:09

nerdabilly