PHP Classes

PHP User Location Details: Find users' location and display it on Google Maps

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 289 This week: 1All time: 7,506 This week: 63Up
Version License PHP version Categories
puld 1.0.0The PHP License5Networking, PHP 5, Web services, Geog...


This package can find users' location and display it on Google Maps.

It can take the current user IP address and determine the IP associated location.

The package can also generate static images or display interactive maps using Google Maps to display the user location.

Picture of zinsou A.A.E.Mo´se
  Performance   Level  
Name: zinsou A.A.E.Mo´se is available for providing paid consulting. Contact zinsou A.A.E.Mo´se .
Classes: 50 packages by
Country: Benin Benin
Age: 34
All time rank: 6781 in Benin Benin
Week rank: 44 Up1 in Benin Benin Equal
Innovation award
Innovation award
Nominee: 23x

Winner: 2x


$hostname = "localhost";

$username ="root";


$bdd=new PDO('mysql:host='.$hostname.';dbname='.$database,$username,$password,array(PDO::ATTR_ERRMODE=> PDO::ERRMODE_EXCEPTION));

Exception $e)

 First Way : you can specify all your setting yourself by creating an instance
 yourself that will then have all the methods from VSIPD and MapBuilder

$x=new KnowMyUser('');//specify a specific IP address to work
echo $x->buffered_staticmap("9",'640x200',$bdd);//a way to load a buffered image as suggested by someone
// $x->GetjustBasics_Map($bdd);//this is a short cut method to load a dynamic map but you can set every thing this way:

$x=new KnowMyUser(); //get user IP to work
$map=$this->seehim_onMap();//see this method statement to know the parameters needed here we use the defaults

//from here you can set yourself your map details as specified in the reference.txt file or in the numerous examples
//of the MapBuilder class package directory.An example could be from there :

// Set the default map type.

// Set width and height of the map.
$map->setSize(650, 450);

// Set default zoom level.

// Set minimum and maximum zoom levels.

// Disable mouse scroll wheel.

// Make the map draggable.

// Enable zooming by double click.

// Disable all on-map controls.

// Display the map.


second way: use a short cut with predefined map settings

KnowMyUser::Fastway('',$bdd);// to know a specific ip location
// KnowMyUser::Fastway(null,$bdd);//to know the client IP address or even without database storage:
// KnowMyUser::Fastway();//to know the client IP address even without database storage


This package allows the user to use these three packages: PHP-IP:, MapBuilder: and Very simple IP details :, to find users location or specific IP location details and show the location on a google static or interactive map. The package just act as the glue that join the three packages so user need to download them separately to know more about all the available methods and how to optimally take advantage of the package. Please ,be sure to be patient while example file is loading google interactive map because it takes some time. Also be sure to let the browser development tools open to know the progress while testing. Finally you may got an API KEY issue while testing on localhost be sure to test it in this case online or try to get your own API KEY by following the directives in the main class source. For a basic how to use example see the file testKnowMyuser.php and read carefully the comments lines. For bug reporting,feedback and suggestion use this package's forum on other three package forums or contact me at;

  Files folder image Files  
File Role Description
Plain text file class.getIP.php Class class source
Plain text file class.ipdetails.php Class class source
Plain text file class.MapBuilder.php Class class source
Plain text file KnowMyUser.class.php Class main class source
Accessible without login Plain text file readme.txt Doc. readme
Accessible without login Plain text file testKnowMyUser.php Example example script 13KB
Downloadpuld-2017-11-01.tar.gz 12KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Map Builder Download .zip .tar.gz license,documentation but also required because it is used to build and show interactive map from google based on user location Required
Very Simple IP Details Download .zip .tar.gz Know more about specific methods and required if you want to store details in database or work on it Required
PHP-Ip Download .zip .tar.gz license,documentation but also required because it is used to get user real ip even behind a proxy Required
 Version Control Unique User Downloads Download Rankings  
This week:1
All time:7,506
This week:63Up