As Jon mentioned - such rule could be pretty "dangerous", and should be used with care. The main reason - there are many file types in internet, and although the MWG has pretty big media type catalog - it still can lack some type definitions, so you can block many downloads, especially if such rule will be used in "Embedded Cycle", so many files inside installers, archives, etc. could be not detected & blocked.
Regarding your particular cases:
- the PHP file is very strange - it contains about 30Kb of null characters at the begin of file, and HTML content is after that null characters.
- the www.hamariweb.com - the page contains embedded object (OLE object specified as Data URI), and we decode it, and this is binary object without particular signature.
What I found that has been tested and has managed to work for me is using the property "MediaType.FromHeader" and set the Action of your choice base an entering a wildcarded format of the content type that you are trying to allow.
In the case of the issue I was trying to overcome I had to create a rule using the property "MediaType.FromHeader" and asked it to match "Video/*" and set the rule action to "Block". The reason I have had to create this rule is because the customer I am working for is trying to block streaming media and Web Gateway V7.3.2 does not have "video/f4f" in its media catalogue.
I hope that this is of some help to you