Now from here we will try to create a Visitor Locator Application.What will u need ?
1. Basic HTML knowledge
2. Offcourse internet connection
3. basic knowledge of java-script....
In later section we will discuss how to create same app with server side coding.....
First Step: Add Map & Script Referencs
After locating a visitor u need to show it on map.So what we need first a map where u can graphically show the position of IP address user. I prefer google map.As we dont have domain so what we will do?We will use the key of google,create HTML file and place following script in [B]head section.
Note :As we are looking for client side script so u can use this script
So it will look like this :

Step 2:
Now we just put all references of scripts Now its time to create Google map.
code

Step 3:
load map on page load and show visitor location.To so Follwing code is used

Complete code:
-------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------
Thats it .....
Your Visitor locator is created....place this code in any website.As soon as visitor vist site he will be located in Google map.Want to know something more about visitor you can use following script also.
-----------------------------------------------------------------------------------------------------
document.write("Browser CodeName: " + navigator.appCodeName);
document.write("
");
document.write("Browser Name: " + navigator.appName);
document.write("
");
document.write("Browser Version: " + navigator.appVersion);
document.write("
");
document.write("Cookies Enabled: " + navigator.cookieEnabled);
document.write("
");
document.write("Platform: " + navigator.platform);
document.write("
");
document.write("User-agent header: " + navigator.userAgent);
0 comments:
Post a Comment