QLD Courts Law List Fetcher

Do you know how many courts there are in Queensland? Short answer: lots.

So, why not write a script that goes and fetches all the “law lists” every day. Then you could apply a sprinkle of regular expression magic and email them off to the people who are interested.

$courts = fopen("courts.txt","r");
while($line = fgets($courts)) {
    $line = trim($line);
    $court = explode("|", $line);
    exec("curl ".$court[0]." > \"lists/".
      date("Y-m-d")." ".$court[1]."\"");

Then all you need is an appropriately formatted list of all the courts.

This entry was posted in Programming, Work On Fun Shit Day. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *