Пример #1
0
 public function filter()
 {
     $dns = json_decode(INPUT::get('data'));
     foreach ($dns as $val) {
         $vt = new VirusTotalController();
         $loc = $vt->getInfoByDnsF($val);
         if (empty($loc)) {
             continue;
         }
         foreach ($loc as $location) {
             $ip = $location['ip'];
             $lat = $location['lat'];
             $lon = $location['lon'];
             \DB::collection('mapControlling')->where('dns', $val)->insert(array('dns' => $val, 'ip' => $ip, 'coordinates' => array('lat' => $lat, 'lon' => $lon)));
         }
     }
     //return redirect('proverka')->setStatusCode(200);
 }