Skip to content

Instantly share code, notes, and snippets.

@uppfinnarjohnny
Created March 14, 2012 12:20
Show Gist options
  • Save uppfinnarjohnny/2036107 to your computer and use it in GitHub Desktop.
Save uppfinnarjohnny/2036107 to your computer and use it in GitHub Desktop.
PHP script to fetch .se domains about to expire from IIS
<?php
$data = file_get_contents('https://www.iis.se/data/bardate_domains.txt');
$limit = 4;
$domains = array();
foreach(explode("\n", $data) as $line) {
$parts = array_filter(array_map('trim', explode("\t", $line)));
if($parts && strlen($parts[0]) < $limit + 3)
$domains[$parts[0]] = $parts[1];
}
print_r($domains);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment