IP Tools
A reference page for working with IP addresses when developing the NST WUI.
The "GeoIP" service shows one the location associated with a IP address or host name. The following provides some notes to NST developers:
@ipToMapUrl("www.networksecuritytoolkit.org")
https://www.geoiptool.com/en/?IP=www.networksecuritytoolkit.org
<p @ipToMapHoverEnhance("sourceforge.net")> Clicking on this paragraph will show you the location of sourceforge.net. NOTE: This may cause problems if you try an nest another span inside: @ipToMapSpan("google.com"). </p> <div>Images (<img @ipToMapHoverEnhance("vaisala.com") @htmlAttr("src","@outUrl()/images/geoip_planet_earth.gif") @htmlAttr("alt","Map vaisala.com") />) can use this macro too!</div>
<p onmouseover="NstIp.hoverMapEnhance(this, event , 'sourceforge.net');"> Clicking on this paragraph will show you the location of sourceforge.net. NOTE: This may cause problems if you try an nest another span inside: <span class="ipToMap" onmouseover="NstIp.hoverMapEnhance(this, event );">google.com</span>. </p> <div>Images (<img onmouseover="NstIp.hoverMapEnhance(this, event , 'vaisala.com');" src="/nst/images/geoip_planet_earth.gif" alt="Map vaisala.com" />) can use this macro too!</div>
Clicking on this paragraph will show you the location of sourceforge.net. NOTE: This may cause problems if you try an nest another span inside: google.com.
@ipToMapSpan("www.networksecuritytoolkit.org") @ipToMapSpan("nst.sourceforge.net","@htmlAttr("style","color: yellow;")")
<span class="ipToMap" onmouseover="NstIp.hoverMapEnhance(this, event );">www.networksecuritytoolkit.org</span> <span class="ipToMap" style="color: yellow;" onmouseover="NstIp.hoverMapEnhance(this, event );">nst.sourceforge.net</span>