''); } } if ($is_domain && count($parts) > 0) { build($data[$part], $parts); } } /** * * Update the public suffix list files. * */ // get the origin text file $text = file_get_contents('http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1'); $lines = explode("\n", $text); // convert text lines to data $data = []; foreach ($lines as $line) { // massage the line $line = trim($line); // skip empty and comment lines if (! $line || substr($line, 0, 2) == '//') { continue; } // get the line parts and build into the psl data $parts = explode('.', $line); build($data, $parts); } // write the data to a PHP file $code = '