Skip to main content
Participant
November 15, 2006
Question

swf and referring domain

  • November 15, 2006
  • 2 replies
  • 264 views
Is there a way to find the domain of the page that loads my swf. For example, someone embeds an swf served from my server on their www.myspace.com page. Is there is way for me to determine that the request is coming from myspace.com at runtime?
This topic has been closed for replies.

2 replies

Participant
November 18, 2006
Unfortunately I cannot use server side scripting here to get the referring domain. I was hoping there was a method for getting it from the flash player. I figure the player must know the referring domain as it is able to block or grant access with the allowscriptaccess parameter.
The closest I've gotten to my goal is writing a javascript function on the fly that writes the referring domain into the swf. Like this: getURL("javascript:document.mySWF.SetVariable('referringDomain',document.loc
ation.host)");
Unfortunately this method interrupts the page rendering in IE so I can't use this either. Anyone have any other ideas, even if it is AS 3, I'd love to hear it.
November 16, 2006
yes ! its possible !
But, you cant dont it only with Flash..
You can use php or some other server side scripts..