As you probably know, php is all done serverside and is run before you get to see the page in html so iframe code would have to be generated in the php part of the program. In php, you can check $_SERVER['SERVER_NAME'] if you need to check the domain name and branch accordingly.
Unless you have control of the page that the iframe is placed on, I do not think that you can use php to do that kind of check. I might be mistaken though, see what others say.