-
Notifications
You must be signed in to change notification settings - Fork 0
/
testloop
executable file
·101 lines (83 loc) · 2.89 KB
/
testloop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
foreach ($results->statuses as $result) {
if(!($result->geo==null)){
$json_obj = json_decode(json_encode($result->coordinates), true);
$key = array_search ( $json_obj["coordinates"][0] , $locList );
if($key!=false)
{
$key = $key+1;
if ($locList[$key] ==$json_obj["coordinates"][1] )
{$locList[$key+1] = $locList[$key+1] +0.05;
echo "dupe";
}
}
else
{array_push($locList, $json_obj["coordinates"][0], $json_obj["coordinates"][1],.05); }
}
else{
$thing = getLatLon( $result->user->location);
$key = array_search ( $thing[0] , $locList );
if($key!=false)
{
$key = $key+1;
if ($locList[$key] == $thing[1] )
{$locList[$key+1] = $locList[$key+1] +0.05;
echo "dupe";
}
}
else
{ array_push($locList, $thing[0], $thing[1],.05);}
}
}
if(in_array( $json_obj["coordinates"][0] , $locList ))
{
$key = array_search ( $json_obj["coordinates"][0] , $locList )+1;
if ($locList[$key] ==$json_obj["coordinates"][0] )
{$locList[$key+1] = $locList[$key] +0.1;
echo "dupe";
}
}
else
{array_push($locList, $json_obj["coordinates"][0], $json_obj["coordinates"][1],.1); }
}
else{
$thing = getLatLon( $result->user->location);
array_push($locList, $thing[0], $thing[1],.1);
}
}
$key = array_search ( $json_obj["coordinates"][0] , $locList );
if($key!=false)
{
$key = $key+1;
if ($locList[$key] ==$json_obj["coordinates"][1] )
{$locList[$key+1] = $locList[$key+1] +0.05;
}
}
else
{array_push($locList, $json_obj["coordinates"][0], $json_obj["coordinates"][1],.05); }
}
else{
$thing = getLatLon( $result->user->location);
$key = array_search ( $thing[0] , $locList );
if($key!=false)
{
$key = $key+1;
if ($locList[$key] == $thing[1] )
{$locList[$key+1] = $locList[$key+1] +0.05;
}
}
else
{ array_push($locList, $thing[0], $thing[1],.05);}
}
}
foreach ($results->statuses as $result) {
if(!($result->geo==null)){
$json_obj = json_decode(json_encode($result->coordinates), true);
array_push($locList, $json_obj["coordinates"][0], $json_obj["coordinates"][1],.1);
}
else{
$thing = getLatLon( $result->user->location);
array_push($locList, $thing[0], $thing[1],.1);
}
}
?>