Lat Long 来自 GPS Tracker URL

问题描述 投票:0回答:2

我有一个GPS追踪器,型号:GPS TRACKER GF21。我发送消息 999 以接收位置,它返回给我真实的设备位置,如下所示: BAT=84%,http://www.08gps.com/gps.php?x=Xq3XX3nccngn23g?zq=FzFFgz&?F3=zcXt3X

但是,我怎样才能从这个网址得到经纬度呢?我想将它存储在我的数据库中。 gps 响应的另一个例子。

1 - BAT=23%,http://www.08gps.com/wlbs.php?x=Xq3XX3nccngn23gvzxnXziFgqXFi3Fqqzyzg2&wifi=1?61?308550516084435037&2?70?16188184709064944

2 - BAT=99%,http://www.08gps.com/wlbs.php?x=Xq3XX3nccngn23gvvyfXziFgqFzcX3FFrX2zzn&wifi=1?75?160907828724115569&2?75?168220145604241521

3 - BAT=86%,http://www.08gps.com/gps.php?x=Xq3XX3nccngn23g?zq=FXnXzc&?F3=z23cqq

url gps tracker
2个回答
0
投票

对于有此问题的任何其他人,纬度、经度和 IMEI 是使用非常基本的密码在 URI 中编码的。

x=Xq3XX3nccngn23g?zq=FzFFgz&?F3=zcXt3X
  IIIIIIIIIIIIIIIAAAAAAAAAA OOOOOOOOOO
  359339077010891-25.424412 -49.273693

where I = IMEI, A = latitude, O = longitude

The cipher is [ngzXFqtc23=?] => [01234567890.-]

这让你在巴西库里蒂巴。


0
投票

由于缺乏声誉,我无法发表评论,但添加到 TwoRedCells 的答案中,这里有一些 php 来进行解码:

<?php

function decypher($s)
{
    $k = "ngzXFqtc23=?";
    $v = "0123456789.-";
    $result = '';
    for ($c = 0; $c < strlen($s); ++$c) {
        $result .= $v[strpos($k, $s[$c])];
    }
    return $result;
}

$i = "Xq3XX3ncqF2qtFXqz=cq3gtn&?g=F2gXgq"; // <==== Put your string here 

$imei = substr($i, 0, 15);
list($lat, $lon) = explode('&', substr($i, 15));

$imei = decypher($imei);
$lat = decypher($lat);
$lon = decypher($lon);

echo "imei=$imei\nlat=$lat\nlon=$lon\n";

echo "https://www.openstreetmap.org/#map=17/$lat/$lon\n"

在控制台中运行时,您会得到:

imei=359339075485643
lat=52.759160
lon=-1.481315
https://www.openstreetmap.org/#map=17/52.759160/-1.481315
© www.soinside.com 2019 - 2024. All rights reserved.