A comprehensive collection of Bangladeshi addresses data, including a PHP form and API for easy integration.
- Bangladeshi Addresses Data: A complete dataset of divisions, districts, upazilas, and post offices in Bangladesh.
- PHP Form: A user-friendly form to select and manage addresses.
- API: A simple API to fetch address data programmatically.
- Clone the repository:
git clone https://github.com/yourusername/bd_addresses.git
- Move into the project directory:
cd bd_addresses - Set up your web server:
- Place the project in your web server's root directory (e.g.,
htdocsfor XAMPP). - Ensure PHP is installed and running.
- Place the project in your web server's root directory (e.g.,
- The addresses data is available in the
data/directory in JSON format. - Files include:
bd-divisions.json: List of all divisions.bd-districts.json: List of all districts.bd-upazilas.json: List of all upazilas.- Individual district files (e.g.,
1.json,2.json, etc.) containing post office data.
- Open
address-form.phpin your browser to use the address form. - The form allows you to select a division, district, upazila, and post office, and enter a village/mahalla.
- Use
api.phpto access the API endpoints:api.php?action=divisions: Returns all divisions.api.php?action=districts&division_id=<id>: Returns districts for a specific division.api.php?action=upazilas&district_id=<id>: Returns upazilas for a specific district.api.php?action=postoffices&district_id=<id>: Returns post offices for a specific district.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.