{"id":16413580,"url":"https://github.com/austintoddj/zip-calc","last_synced_at":"2025-03-23T06:31:22.290Z","repository":{"id":62489652,"uuid":"45478675","full_name":"austintoddj/zip-calc","owner":"austintoddj","description":"Zip Code Range and Distance Calculation Class","archived":false,"fork":false,"pushed_at":"2018-11-22T04:52:53.000Z","size":3549,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T18:21:48.508Z","etag":null,"topics":["distance","php","postgresql","radius","zip-code"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austintoddj.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-03T16:14:37.000Z","updated_at":"2025-02-10T17:32:42.000Z","dependencies_parsed_at":"2022-11-02T11:15:23.194Z","dependency_job_id":null,"html_url":"https://github.com/austintoddj/zip-calc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintoddj%2Fzip-calc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintoddj%2Fzip-calc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintoddj%2Fzip-calc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintoddj%2Fzip-calc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austintoddj","download_url":"https://codeload.github.com/austintoddj/zip-calc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066496,"owners_count":20555402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distance","php","postgresql","radius","zip-code"],"created_at":"2024-10-11T06:51:49.449Z","updated_at":"2025-03-23T06:31:20.577Z","avatar_url":"https://github.com/austintoddj.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About Zip-Calc\n\nZip-Calc was created to convert a PHP class written by [Quixotix](https://github.com/Quixotix/PHP-ZipCode-Class) in 2005 from MySQL to PostgreSQL. This class calculates the distance between U.S. zip codes and also finds all of the zip codes within a 9 given radius of a known zip code.\n\n## Database\n\nThe `CREATE` syntax for the database table used in the example is as follows:\n\n```sql\nCREATE TABLE \"public\".\"maps\" (\n    zip_code_id  SERIAL PRIMARY KEY,\n    zip_code TEXT NOT NULL,\n    city TEXT NOT NULL,\n    county TEXT NOT NULL,\n    state_name TEXT NOT NULL,\n    state_prefix TEXT NOT NULL,\n    area_code TEXT NOT NULL,\n    time_zone TEXT NOT NULL,\n    lat NUMERIC(10,7) NOT NULL,\n    lon NUMERIC(10,7) NOT NULL\n);\n```\n\n## Installation\n\nInstall the project via [Composer](https://getcomposer.org):\n\n```sh\ncomposer create-project austintoddj/zip-calc\n```\n\n## Step 3: PgSQL Import\n\nOnce inside your database, import the `data/maps.sql` file included in the project. If you need some assistance on getting up and running with a PgSQL database, find out more on [Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04).\n\n## Step 4: Update the Credentials\n\nIn the `example.php` file, you will need to update the `$connectionString`.\n\n## Step 5: Run the Example\n\nIf you followed the steps up to this point correctly, you should see the following when you access `example.php` from a browser:\n\n![Example Screenshot](https://raw.github.com/austintoddj/PHP-PostgreSQL-ZipCode-Class/master/images/example.png)\n\n## License\n\nZip-Calc is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustintoddj%2Fzip-calc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustintoddj%2Fzip-calc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustintoddj%2Fzip-calc/lists"}