The Weather App is a simple web application that provides weather details using the OpenWeatherMap API. It also offers the functionality to subscribe to weather updates via email using PHPMailer and PHP.
-
Weather Information: Retrieve real-time weather information for any location using the OpenWeatherMap API.
-
Email Subscription: Users can subscribe to receive weather updates via email for their chosen locations.
-
Email Notifications: Automated email notifications with weather details are sent to subscribed users at regular intervals.
- JavaScript
- PHP
- PHPMailer
- OpenWeatherMap API
-
Clone the repository:
git clone https://github.com/yourusername/weather-app.git
-
Configure OpenWeatherMap API:
- Sign up for a free API key at OpenWeatherMap.
- Replace
your-api-key
with your actual API key in the JavaScript file where API requests are made (weather.js
).
-
Configure Email Settings:
- Edit the PHP files responsible for sending emails (
send_weather_email.php
) and configure your email server settings and credentials. - Make sure to provide SMTP server details and email account information.
- Edit the PHP files responsible for sending emails (
-
Deploy the application on a web server that supports PHP.
-
Open the web application in your browser.
-
Enter the location for which you want to check the weather and click the "Get Weather" button.
-
To subscribe for weather updates via email:
- Enter your email address.
- Select the frequency of updates (e.g., daily, weekly).
- Click the "Subscribe" button.
-
You will start receiving weather updates via email as per your selected frequency.
This project is licensed under the MIT License.
- OpenWeatherMap for providing weather data through their API.
- PHPMailer for facilitating email communication.
- The open-source community for inspiration and support.
Please note that this README provides a high-level overview of the Weather App project. Detailed setup and usage instructions can be found in the project's source code.