Irish SEO,  Marketing & Webmaster Discussion

 

GeoTraceRoute Script

This is a discussion on GeoTraceRoute Script within the Coding Help forums, part of the Webmaster Help category; Does anybody know of any ready made script/tutorial for creating a geo map which can pinpoint a user's location? GoogleMaps ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28-02-2007, 11:10 AM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default GeoTraceRoute Script

Does anybody know of any ready made script/tutorial for creating a geo map which can pinpoint a user's location?

GoogleMaps and the Maxmind GeoLite City - MaxMind - GeoLite City | Free IP Address to City Database - Are my preferred tools of choice....

I'm looking for something similar to this - GeoTool -
__________________
blog | Geansaí Gorm - Written entirely in, awful, Irish! | Me on Blue Jumpers
*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 28-02-2007, 12:22 PM
niall's Avatar
Hosting Caretaker
 
Join Date: Jan 2007
Location: Carlow
Posts: 65
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
niall will become famous soon enough
Send a message via ICQ to niall Send a message via MSN to niall
Default

Quote:
Originally Posted by Rollo View Post
I'm looking for something similar to this - GeoTool -
You can do it exactly the same as Geotool does it. GeoCity's location field gives you the GPS coordinates of the IP. You can then pass these coordinates into the Google API and get the little mark on the map.

Haven't used the Geoip API in a while. What language are you going to be doing the page in?

Niall.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 28-02-2007, 04:56 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

Hi Nial, thanks for the reply.
I will be coding in PHP but I'm not one bit familar with APIs unfortuntely.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 28-02-2007, 06:15 PM
niall's Avatar
Hosting Caretaker
 
Join Date: Jan 2007
Location: Carlow
Posts: 65
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
niall will become famous soon enough
Send a message via ICQ to niall Send a message via MSN to niall
Default

Quote:
Originally Posted by Rollo View Post
I will be coding in PHP but I'm not one bit familar with APIs unfortuntely.
I was familiar with the API for both, but haven't used them in a while. Will have a look this evening for some of my old stuff if you like.

Niall.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 28-02-2007, 06:38 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

that would be very helpful, thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 28-02-2007, 11:08 PM
niall's Avatar
Hosting Caretaker
 
Join Date: Jan 2007
Location: Carlow
Posts: 65
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
niall will become famous soon enough
Send a message via ICQ to niall Send a message via MSN to niall
Default

The following code should do what you want:

PHP Code:
# Include the geoip api files
include("geoipcity.inc");
include(
"geoipregionvars.php");
$gi=geoip_open("/path/to/GeoIPCity.dat",GEOIP_MEMORY_CACHE);
# Get the details for the remote address
$record geoip_record_by_addr($gi,$_SERVER['REMOTE_ADDR']); 
The following variables should be available: country_code, region, city, postcode, latitude, longitude, dma_code and area_code. So for example, to print the city, you can do:
PHP Code:
print $record->city
You can look at the Google docs to get all the details for getting a map on your page. The part you'll be most interested in is adding the point to the map. First you'll have the center the map on the point you're interested in, so you can do:
PHP Code:
map.setCenter(new GLatLng(<?=$record->longitude;>, <?=$record->latitude;?>), 5);
The you will have to add the marker:
PHP Code:
var point = newGLatLng(<?=$record->longitude;>,<?=$record->latitude;?>), 5);
var marker = createMarker(point,"<?=$record->city;?>");
map.addOverlay(marker);
Hope this helps.

Niall.

Last edited by niall; 28-02-2007 at 11:10 PM. Reason: Mispaste near the top
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 01-03-2007, 12:12 AM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

cheers nial,
I will have a pop at that tomorrow evening
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
geotraceroute, script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Script Installation, Server Administration bizhat Marketplace Offers 2 10-03-2008 12:29 PM
Survey Script suggestions/recommendations ? paul Webmaster Discussion 2 08-02-2007 01:32 PM
script help.... concatenation? 7aken Coding Help 1 06-02-2007 01:06 PM
Episode Guide Script Ronan O'F Coding Help 4 05-01-2007 10:23 AM
Script for Amazon.fr? blacknight Amazon 0 06-08-2006 02:46 AM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 04:28 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0