public static function zip($zip, $check_usps = true) {

        $result = new \sb\Validate\Results();
        $result->value = $zip;
        $result->is_valid = false;

        if (preg_match("/^(\d{5})(-\d{4})*$/", $zip)) {
            $result->message = "Valid zip code format";
            $result->is_valid = true;

            if ($check_usps) {

                $page = @file_get_contents("https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=2&postalCode=" . substr($zip, 0, 5));

                if (!$page) {
                    $result->message .= ' cannot reach USPS site to validate zip code existence';
                } else {
                    preg_match("~<p class=\"std-address\">(.*?)</p>~", $page, $city);

                    if (isset($city[1])) {
                        $data = trim($city[1]);
                        $result->state = substr($data, -2, 2);
                        $result->city = ucwords(strtolower(preg_replace("~" . $result->state . "$~", "", $data)));
                        $result->message .= " for " . $result->city . ',' . $result->state;
                    } else {
                        $result->message .= " but city not found!";
                        $result->is_valid = false;
                    }
                }
            }
        } else {
            $result->message = "Invalid zip code format ";
        }


        return $result;
    }