oki bump...
Distance from you to the user that u look is now done.
Here a pic of how it looks like:
Attachment:
nationalismus_part_3.png [ 2.22 KiB | Viewed 4165 times ]
The code for that is quite simple
(just for reminding myself silly code beginer n00b on calculate a distance on a ball...)
Code:
// distance calculation --> surfer <--> displayed player
$surferip=$_GET['surferip'];
$record = geoip_record_by_name($surferip) ;
if($record) {
$lat1 = $record['latitude'] ;
$lon1 = $record['longitude'] ;
}
$lat2 = $row[latitude];
$lon2 = $row[longitude];
$distance = (6378*3.1415926*sqrt(($lat2-$lat1)*($lat2-$lat1) + cos($lat2/57.29578)*cos($lat1/57.29578)*($lon2-$lon1)*($lon2-$lon1))/180);
$intdistance = ((int)$distance);
$intdistancemiles = ((int)(0.621371192 * $intdistance));