[eluser]champs[/eluser]
If you're embedding an entire page through an IFRAME, then this ought to work, not that I've tested it..
Code:
// get the referring page, i.e. http://example.com/2008/01/25/some-boring-crap.html
$referer = $this->input->server('HTTP_REFERER');
// turn the page into its constituent parts (scheme/host/URI/query string, etc.)
$r_parts = parse_url($referer);
// grab the array index you care most about
$domain = $r_parts['host'];
If it's just the SWF, then it will be up to Flash to grab the same information, and since I stabbed all ActionScript knowledge out of my brain years ago and can't easily find the documentation on it, you're on your own.