Welcome Guest, Not a member yet? Register   Sign In
IP of remote Server - embedded script
#1

[eluser]LuckyFella73[/eluser]
Hi,

my question is not CI related but maybe you can help allthough.
I have a swf file stored on a "central"-server. Visitors of the
website can copy an "embed-script" to embed the script on their
site (iframe/ frame). Is it possible to read the IP of the
other server every time the swf is accessed? I want to now,
on which domains the swf file is embedded.
#2

[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.
#3

[eluser]LuckyFella73[/eluser]
hej champs,
just found your reply - thanks! Exactly what I was looking for!




Theme © iAndrew 2016 - Forum software by © MyBB