Eingebundene URL

Sancheck

Legendäres Mitglied
Hallo,
ich habe ein Javascript,dass über einen Adserver ausgeliefert wird, bei den meisten klappts, aber es gibt welche wo es Probleme gibt:

CODE
try {
document.write('<iframe src="http://xxx.com/ref.php?ref=dr'+encodeURIComponent(document.referrer)+'" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>');
} catch (e) {};try {
document.write('<iframe src="http://xxx.com/ref.php?ref=tlh'+encodeURIComponent(top.location.href)+'" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>');
} catch (e) {};try {
document.write('<iframe src="http://xxx.com/ref.php?ref=tlh'+encodeURIComponent(parent.location.href)+'" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>');
} catch (e) {};try {
document.write('<iframe src="http://xxx.com/ref.php?ref=tlh'+encodeURIComponent(self.location.href)+'" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>');
} catch (e) {};
}



Also die meisten können document.referrer auslesen per JS, wie bekomme ich aber die Hauptdomain raus?

Weil einige liefern mir zurück:
http://ad.yieldmanager.com/iframe.....


 
Zurück
Oben