A simple weather application that fetches and displays current weather data for a given city using the OpenWeatherMap API.
- Search for the weather by city name.
- Displays temperature in Celsius.
- Shows current weather description (e.g., sunny, cloudy, etc.).
- Includes additional weather details such as sunrise, sunset, wind speed, and humidity.
- User-friendly interface with a modern design.
You can try the weather application by visiting the live demo.
- PHP for server-side scripting.
- cURL for fetching data from the OpenWeatherMap API.
- OpenWeatherMap API for getting real-time weather data.
- HTML5 & CSS3 for building the user interface.
To set up the project on your local machine, follow these steps:
git clone https://github.com/NoMercy404/WeatherApp.gitcd WeatherAppAPI_KEY="your-api-key-here"You can download PHP from here.
php -S localhost:80006. Open your browser and go to http://localhost:8000 to see the app in action.
- Enter the name of the city in the input box.
- Click the "Get Weather" button.
- The weather data for the specified city will be displayed below the form.
- If the entered city does not exist or cannot be found, the app will display an error message: "City not found."
- In case of an invalid API key or another issue, an appropriate error message will be shown.