The following map is generated live from this page. It shows the countries MapsGeek users are from. This page gathers the information, builds the URL and display the map.
The URL has to contain the following information :
<?
// The base URL containing the map and l1 parameters and introducing the dl1
$url = "http://www.mapsgeek.com/live.php?map=gvux92r58surqfkx&l1=1023&dl1=";
// The query to gather the information
$query = "select COUNTRY, count(USERS) NBU from USERS group by COUNTRY";
$dbresult= mysql_query($query, $connection_to_database);
// The loop building the dl1 parameter
while($row = mysql_fetch_array($dbresult, MYSQL_ASSOC))
{
$obj = urlencode($row[COUNTRY]); //Encoding the country name, storing in $obj
$val = $row[nbu]; //Storing the number of users into $val
$url .= "$obj:$val;"; //Adding the $obj (country), followed by ':', the $val (number of users), ended by ';'
}
// Displaying the url obtained inside an image tag (and a link to mapsgeek page also)
print("<a href=\"http://www.mapsgeek.com/map/gvux92r58surqfkx\"><img src=\"$url\"></a>");
?>
http://www.mapsgeek.com/live.php?map=gvux92r58surqfkx&l1=1023&dl1=Argentina:1;Australia:9;Austria:2;Barbados:1;Belgium:7;Bolivia:1;Brazil:1;Bulgaria:1;Cameroon:1;Canada:10;China:1;Croatia:2;Czech+Republic:2;Ecuador:2;Finland:1;France:83;Germany:9;Hungary:3;India:10;Indonesia:3;Ireland:1;Italy:10;Kuwait:1;Madagascar:1;Malaysia:1;Mali:1;Martinique:1;Mayotte:1;Mexico:1;Montserrat:1;Morocco:2;Netherlands:4;Nicaragua:1;Norway:1;Pakistan:1;Peru:1;Philippines:2;Poland:2;Portugal:3;Romania:1;Russia:1;Saudi+Arabia:1;Serbia:1;Spain:3;Sweden:1;Switzerland:4;Turkey:1;Ukraine:3;United+Arab+Emirates:1;United+Kingdom:20;United+States:150;Venezuela:3;
You can get more help in the forum
![]() |
MapsGeek, 2009.       Disclaimer       Privacy Policy       Terms of Service |
| Maps on MapsGeek are licensed under a CC Attribution-Noncommercial-No Derivative Works 3.0 USA License. |