View Full Version : Detect Please
05-02-2006, 06:02 AM
okay, i decided to make myself a website for a tiny company which i will then make official when i hit 16...
Hello + IP +, Your last visit was on + lastVisit
on the next line i want it to say
You have came from + lastWebsite + and you are using + navigator.appName + navigator.appVersion
can someone help me code it? i have NO idea how to get the last webpage nor the ip adress, or the last visit
05-02-2006, 06:42 AM
document.write("You have came from "+document.referrer+" and you are using "+navigator.appName+" "+navigator.appVersion)
05-02-2006, 07:03 AM
oh yeah, forgot to tell ya that if you get a direct hit (meaning the visitor types the url directly into the window themselevs) then it will be blank space from where they came from. so you prolly better off with something like this:
var referred_from=(document.referrer=="")?referred_from="a new window":referred_from=document.referrer;
document.write("You have came from "+referred_from+" and you are using "+navigator.appName+" "+navigator.appVersion);
the first one that says "a new window" is what will show up if they are a direct hit.
05-02-2006, 09:55 PM
i would but i have a MASSIVE problem installing php, it IS SOO CONFUSING
can someone give me a link to a good guide because the best guide they gave me is the one in high detail called: Installing APache+Php5+MySQL but it had a big problem since i installed Apache, i tried PHP but when i downloaded the files, the dll files were NOT there... plus i did not install anything since it did not tell me to
i would happily do it because PHP can do everything JS can but better... but since i can't i well...can't...
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.