Page 1 of 1

Checking Top

Posted: Mon Oct 20, 2003 8:31 pm
by d3ad1ysp0rk
First off..

JS code:

Code: Select all

if(self != top)
{
document.write("In a frame");
}
else
{
document.write("Not.");
}
How would you make that PHP compatible? since AIM windows don't allow javascript.


Secondly, do any of you have another way to tell whether the user is using the info window for AIM to access the site, or a browser? because everytime I try including a visitor log on my homeade subprofile, jerks copy the hyperlink, paste it into IE, and change "s=%n" to whatever they want, then refresh, messing up the counters and stuff..

I wish I knew how subprofile.com did it.. they have a function where if you try changing it in the url in a browser, it logs u as annoynomous, so u can't mess with ppls subprofiles..


Thanks in advance!

Posted: Mon Oct 20, 2003 8:50 pm
by volka
php is not aware of the window/frame structure of the client. You cannot test that.
Maybe the aim-client sends a HTTP_USER_AGENT header with each request. That's not bulletproof since clients are free to send arbitrary values but it's the best I can offer (don't know anything about aim ;) )