# Flash Crossdomain Policy files

**URL:** <https://forum.kirupa.com/t/flash-crossdomain-policy-files/297512>\
**Category:** Uncategorized\
**Created:** [October 3, 2009, 5:48pm UTC](https://forum.kirupa.com/t/flash-crossdomain-policy-files/297512 "2009-10-03T17:48:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ikinsey](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Ikinsey](https://forum.kirupa.com/u/Ikinsey)\
**Post date:** [October 3, 2009, 5:48pm UTC](https://forum.kirupa.com/t/flash-crossdomain-policy-files/297512/1 "2009-10-03T17:48:41Z")

</div>

Ok so I have my Flash application connecting to my PHP socket script on port 8080. I have a crossdomain policy file on my server at myip/crossdomain.xml. I just want to get this working for now so for now it looks like this:

\<?xml version=“1.0”?\>  
\<cross-domain-policy\>  
\<allow-access-from domain="_" secure=“false to-ports=”_"\>\</allow-access-from\>  
\</cross-domain-policy\>

My socket script also writes back if Flash for some reason tries looking for a polciy file there, this is how it writes back:

$policy\_file = “”;  
$policy\_file .= “\<cross-domain-policy\>”;  
$policy\_file .= ‘\<allow-access-from domain="\*" to-ports=“8080” secure=“false”/\>’;  
$policy\_file .= “\</cross-domain-policy\>”;

```
            write_to_socket($node, $policy_file);

```

Two problems. One is that for some reason Flash keeps trying to find the policy file at my destination socket instead of at myip/crossdomain.xml . Problem 2 is that it still won’t give me access even with the data my socket script sends it.

Any ideas?
