IP Address geocoding on Google Maps

This Tutorial Shows You How To Plot Visitors In Google Maps, In Reality The Ip Addresses Would Be Stored In A Database And Date Range Selected From A Jquery Date Picker

Download ipmapper.js Download You Will Require THis File

Result

<!doctype html>
  <html>
  <head>
  <meta charset="UTF-8">
  <title>Untitled Document</title>
  </head>
<body>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  <script type="text/javascript" src="js/ipmapper.js"></script>
 
  <script type="text/javascript">
  $(function(){
 $("#select").change(function() {
  var dateRange = $("#select").val();
 if(dateRange == "Yesterday")
  {
  try{
  IPMapper.initializeMap("map");
  var ipArray = [<?php echo '"61.98.239.192"'; ?>];
  IPMapper.addIPArray(ipArray);
  } catch(e){
  //handle error
  }
 }
 if(dateRange == "Today")
  {
  try{
  IPMapper.initializeMap("map");
  var ipArray = ["84.45.12.150", "89.238.157.27"];
  IPMapper.addIPArray(ipArray);
  } catch(e){
  //handle error
  }
 }
  
  })
  
  });
  </script>
<select id="select">
  <option>Select Range</option>
  <option>Today</option>
  <option>Yesterday</option>
  </select> 
<div id="map" style="height: 800px;"></div>
  </body>
  </html>

Available For Freelance:

I Am Available To Work For You Freelance, See My Skills To See If I Can Help Your Project, If I Can Help You Then Please Contact Me.

My Rates Start From £180 A Day, Discount Prices For Regular Clients And Work Over 3 Days.

I Started To Learn Web Development In 2008, I Did A Few Open University Courses While Working Full Time In The Building Trade, I Managed To Get A Diploma With Distinction

Request A Tutorial

If You Are Having Difficulty With The Development Of Your Website Or If You Are Just Starting Out Leaning Web Development And You Think I Can Help You Then Request A Tutorial, I Will Do My Best To Help You

I Dont Charge For My Services If I Can Help You With Something That Can Be Be Fixed In A Few Minutes.

Advertise

If You Would Like To Advertise On This Site Then Please Contact Me, You Will Be Given Login Details To See What Day And Where Clicks Have Come From.

Prices Start From £10 A Month With Discounts Available For 3 Months Or More.

You Can Either Send Me The Banner Advert That You Have Designed Or From £10 I Can Have Designer Design A Banner For You.

Please Leave A Comment And A Rating





www.codecaven.co.uk image 0.00 out of 5 based on 0 ratings. 0 user reviews.

My Skills:

  • PHP 5
  • JavaScript
  • Jquery
  • XHTML Validation
  • KineticJS
  • HTML5
  • CSS - CSS3
  • SEO

My Social Networks:

  • facebook youtube