checkKnownSites(); $this->searchGoogle(); $this->checkSDRHubs(); return $this->foundSites; } private function checkKnownSites() { $known = [ 'http://websdr.ewi.utwente.nl:8901/', 'http://websdr.su.domains/', 'http://kiwisdr.com/public/', 'http://sdr.hu/', 'http://rx.linkfanel.net/' ]; foreach ($known as $url) { if ($this->isWebSDR($url)) { $this->foundSites[] = $url; } } } private function isWebSDR($url) { try { $context = stream_context_create([ 'http' => ['timeout' => 5], 'ssl' => ['verify_peer' => false, 'verify_peer_name' => false] ]); $content = @file_get_contents($url, false, $context); if ($content && preg_match('/websdr|kiwisdr|waterfall|spectrum/i', $content)) { return true; } } catch (Exception $e) { return false; } return false; } private function searchGoogle() { // Implementação com API do Google (requer chave API) // Esta é uma versão simplificada $queries = [ 'inurl:websdr', '"public websdr"', 'kiwisdr public server' ]; foreach ($queries as $query) { // Simulação - em produção use Google Custom Search API $simulatedResults = [ 'http://websdr.example1.com/', 'http://websdr.example2.com/' ]; foreach ($simulatedResults as $result) { if ($this->isWebSDR($result)) { $this->foundSites[] = $result; } } } } private function checkSDRHubs() { $hubs = [ 'http://kiwisdr.com/public/', 'http://sdr.hu/websdrlist.php' ]; foreach ($hubs as $hub) { // Em produção, faria parsing do HTML para extrair links } } } // Interface Web echo "
❌ Nenhum WebSDR encontrado.
"; } echo ""; echo ""; ?>