LOoking for a hello [your state] script

sapo

Power Member
Joined
Feb 25, 2008
Messages
510
Reaction score
275
I am looking for a script that display your state .

I can find one but I know their has to be, cause we all seen them.

any one can help, REP to those who help
 
I have this script. But I'm on my phone not at my computer. Shoot me a pm and I will give you it tomorrow when I'm home.
 
Code:
<script language="JavaScript">document.write(geoip_state());</script>

Code:
<script language="JavaScript">document.write(geoip_region_name());</script>

Take your pick. :D
 
Last edited:
Or maybe you want city and state in php

Code:
<?php
	$sCity = geoip_city();
	$sState = geoip_state();
	print(" ");
	print($sCity);
	print(", ");
	print($sState);
?>
 
Code:
<script language="JavaScript">document.write(geoip_state());</script>

Code:
<script language="JavaScript">document.write(geoip_region_name());</script>

Take your pick. :D

@marusia - You forgot to give reference link to JS functions

Is your code in PHP?
 
Last edited:
@marusia - You forgot to give reference link to JS functions

Is your code in PHP?

Code:
<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>
 
Nope, no api. I only use what I know (unfortunately not much LOL). With that script, I was only using js and css. I only use api with wordpress.
 
2 ways to do this in php, ill post it when i get home... Simple 5-6 liner to show the state without using maxmind tables
 
Back
Top