[go: up one dir, main page]

0% found this document useful (0 votes)
16 views23 pages

PHP Final 1.1

The document is a micro-project report on 'Weather Forecast' submitted by three students for their Diploma in Computer Engineering at CSMSS College of Polytechnic. It outlines the aims, methodology, resources, and course outcomes related to the project, which focuses on developing a weather application using PHP and APIs. The report includes acknowledgments, an index, and a literature review on PHP and its application in web development.

Uploaded by

sanchitahiwrale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views23 pages

PHP Final 1.1

The document is a micro-project report on 'Weather Forecast' submitted by three students for their Diploma in Computer Engineering at CSMSS College of Polytechnic. It outlines the aims, methodology, resources, and course outcomes related to the project, which focuses on developing a weather application using PHP and APIs. The report includes acknowledgments, an index, and a literature review on PHP and its application in web development.

Uploaded by

sanchitahiwrale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

A

MICRO-PROJECT REPORT ON

“WEATHER FORECAST”
FOR THE DIPLOMA IN COMPUTER ENGINEERING
SUBMITTED BY
BARGAL PAYAL BALKRISHNA
CHAVAN HARSHADA VIJAY
GARUDE PRAJAKTI PARMOD
UNDER THE GUIDANCE OF
Mrs. P. V. POLSHETWAR
DEPARTMENT OF COMPUTER ENGINEERING CSMSS
COLLEGE OF POLYTECHNIC, CHH.SAMBHAJINAGAR
MAHARASHTRA, INDIA

AND MAHARASHTRA STATE BOARD OF TECHNICAL


EDUCATION, MUMBAI

ACADEMIC YEAR 2023-24


CHHATRAPATI SHAHU MAHARAJ SHIKSHAN SANSTHA’S
COLLEGE OF POLYTECHNIC

KANCHANWADI, PAITHAN ROAD, CHH.SAMBHAJINAGAR

MICRO-PROJECT REPORT ON
“WEATHER FORECAST”

FOR THE DIPLOMA IN COMPUTER ENGINEERING

SUBMITTED BY

BARGAL PAYAL BALKRISHNA

CHAVAN HARSHADA VIJAY


GARUDE PRAJAKTI PARMOD

COMPUTER ENGINEERING THIRD YEAR


SUBMITTED TO

COMPUTER ENGINEERING DEPARTMENT


YEAR 2023-2024
CHHATRAPATI SHAHU MAHARAJ SHIKSHAN SANSTHA’S

COLLEGE OF POLYTECHNIC

CERTIFICATE

This is to certify that Ms. PAYAL BALKRISHNA BARGAL, Ms. HARSHADA VIJAY
CHAVAN, Ms. PRAJAKTI PRAMOD GARUDE from (Institute) CSMSS College of
Polytechnic having Enrollment No. 2111520038, 2111520047, 2111520058 have Completed
Micro-Project of third year (5th Sem) having title “Weather Forecast” during academic year
2023-24. The Micro- project completed by individually / in a group consisting of 03 Candidates
under the guidance of the faculty guide.

Project Guide Head of Department

Principal
Acknowledgement

We would like to express our thanks to the people who have helped us most throughout our project.
We would like to express our sincere thanks to the principal of CSMSS College of Polytechnic Dr.
GANESH. B. DONGRE for being always with us as a motivator. We are thankful to the H.O.D.
Of Computer Department Ms. R. S. POPHALE for her kind support. We are grateful to our Project
guide Mrs. P. V. POLSHETWAR or continuous support and motivation for the project. Her help
made us possible to complete our project with all the accurate information. A special thanks of our
goes to our friends who helped us in completing the project, where they all exchanged their own
interesting ideas. We wish to thank our parents for their personal support or attention who inspired
us to go our own way. Finally, we would like to thank God who made all things possible for us till
the end.

Sr. No. Name of Student Sign

1 PAYAL BALKRISHNA BARGAL

2 HARSHADA VIJAY CHAVAN

3 PRAJAKTI PARMOD GARUDE


INDEX

1. MICRO PROJECT PRAPOSAL ....................................................................... 1

2. AIMS/ BENEFITS OF THE MICRO-PROJECT ............................................. 1

3. RATIONALE .................................................................................................... 4

4. COURCE OUTCOMES ACHIVED ................................................................. 1

5. LITRATURE REVIEW ..................................................................................... 5

6. RESOURCES REQUIRED ............................................................................... 3

7. ACTUAL METHODOLOGY FOLLOWED.................................................... 12

8. SKILL DEVELOPED/ LEARNING OUTCOMES .......................................... 16


OF MICROPROJECT

9. APPLICATION OF MICRO PROJECT ............................................................ 17

10. CONCLUSION .................................................................................................. 18


A
MICRO - PROJECT PROPOSAL

TITLE: WEATHER FORECAST


1.0 AIMS /BENEFITS OF THE MICRO PROJECT –
AIM: “WEATHER FORECAST”
Aim:
Weather is something everybody deals with, and accurate data of it like what is
coming can help users to make inform decisions. With weather apps for iOS and
Android, people can exactly know when to expect a change in the weather
conditions. Weather apps can give urgent alerts too.

Undoubtedly, weather forecasting has come a long way, helping people to know
about weather conditions. So, if you are in an area where weather frequently changes
from sunny to torrential rain in a matter of minutes, then what is the easiest way to
make sure to be prepared for A suitable answer is a weather application.

Weather applications continuously update their forecasts, whether it is by the day,


hour or minute, so it always takes us one step ahead. The best weather apps for
Android are like pocket weather channels, and they do not just tell anyone when the
sun is going to shine andthe rain is going to fall, these apps tell us the wind speed,
the UV level, humidity levels, and even “feels like” temperature to account for the
dreaded wind chill.

2.0 COURSE OUTCOMES ACHIEVED:


The theory, practical experiences and relevant soft skills associated with this course are to be
taught and implemented, so that the student demonstrated the following industry- oriented COs
associated with the above-mentioned competency:

a) Develop program using control statement.


b) Perform operations based on arrays and graphics.
c) Develop programs by applying various object-oriented concepts.
d) Use form controls with validation to collect user’s input.
e) Perform database operations in PHP.

1|Page
3.0 PROPOSED METHODOLOGY:

a) For micro-project first I have to decide topic related to PHP Subject.


b) Then I will be researching and collecting information about that topic.
c) Then I will be planning raw project on notebook.
d) Then I will resarch a information and watched video then I will start my main
project.
e) At the time of project if I am getting some problem then I will ask to the
respective subject teacher (Prof ).
f) After removing errors from my project, I will show it to subject teacher for
checking/correction.
g) After completing project, for submitting it in soft copy.
h) I will create proper pdf.

4.0 ACTION PLANS

Name of
Sr. Planned Planned Responsible
No. Details of Activities Start Date Finish Team
Date Member

1 Select the topic about the 12/02/2024 14/02/2024 All


micro project.

Collect information about our


2 15/02/2024 20/02/2024 All
topic.

3 To understand the concept of topic. 21/02/2024 26/02/2024 All

4 Analysis, understand and process. 03/03/2024 06/03/2024 All

5 To prepare project report. 14/03/2024 02/04/2024 All

2|Page
5.0 RESOURCES REQUIRED:
Sr. Name of Resource/Material
No. Specification Qty Remarks

i-5,4 GB RAM
1 Laptop 1

2 https://www.planettogether.com/blog/the- Website -
importance-ofsupply-chain-management

3 Microsoft word Provide Formal view for 2


report
4 Internet htts://www.google.com -
5 EDP Textbook (Techknowledge) I scheme -
6 https://www.americanexpress.com/en- Website -
gb/business/trends-and-
insights/articles/benefits-of-supply-
chain-management/

6.0 NAMES OF TEAM MEMBER WITH ROLL NO:

Enrollment No. Name Of Student Roll No.

2111520038 Payal Balkrishna Bargal 03

2111520047 Harshada Vijay Chavan 06

2111520058 Prajakti Pramod Garude 12

Ms. P. V. POLSHETWAR
DEPARTMENT OF COMPUTER ENGINEERING

3|Page
RATIONALE

PHP is a general purpose, server-side scripting language run a web server that’s designed to
make dynamic pages and applications. PHP as a web development option is secure, fast and
reliable. In the growing field of Web technology, it is essential for every Diploma pass outs to
learn PHP Language to help them build interactive web applications. This course is designed
to inculcate web based applications development skills in students using server side scripting
with PHP.

4|Page
LITERATURE REVIEW
Introduction
The term PHP is an acronym for – Hypertext Preprocessor. PHP is a server-side scripting
language designed specifically for web development. It is open-source which means it is free
to download and use. It is very simple to learn and use. The file extension of PHP is “.php”.
PHP was introduced by Rasmus Lerdorf in the first version and participated in the later
versions. It is an interpreted language and it does not require a compiler.

Characteristics of PHP

• PHP code is executed in the server.


• It can be integrated with many databases such as Oracle, Microsoft SQL Server, MySQL,
PostgreSQL, Sybase, and Informix.
• It is powerful to hold a content management system like WordPress and can be used to
control user access.
• It supports main protocols like HTTP Basic, HTTP Digest, IMAP, FTP, and others.
• Websites like www.facebook.com and www.yahoo.com are also built on PHP.
• One of the main reasons behind this is that PHP can be easily embedded in HTML files and
HTML codes can also be written in a PHP file.
• The thing that differentiates PHP from the client-side language like HTML is, that PHP codes
are executed on the server whereas HTML codes are directly rendered on the browser. PHP
codes are first executed on the server and then the result is returned to the browser.
• The only information that the client or browser knows is the result returned after executing
the PHP script on the server and not the actual PHP codes present in the PHP file. Also, PHP
files can support other client-side scripting languages like CSS and JavaScript.

What is an API?

APIs are mechanisms that enable two software components to communicate with each other
using a set of definitions and protocols. For example, the weather bureau’s software system
contains daily weather data. The weather app on your phone “talks” to this system via APIs
and shows you daily weather updates on your phone.

How do APIs Work?

The working of an API can be clearly explained with a few simple steps. Think of a client-
server architecture where the client sends the request via a medium to the server and receives
the response through the same medium. An API acts as a communication medium between
two programs or systems for functioning. The client is the user/customer (who sends the
request), the medium is the application interface programming, and the server is the
backend (where the request is accepted and a response is provided). Steps followed in the
working of APIs –

5|Page
• The client initiates the requests via the APIs URI (Uniform Resource Identifier)
• The API makes a call to the server after receiving the request
• Then the server sends the response back to the API with the information
• Finally, the API transfers the data to the client
APIs are considered safe in terms of attacks as it includes authorization credentials and an
API gateway to limit access so as to minimize security threats. To provide additional security
layers to the data, HTTP headers, query string parameters, or cookies are used. So in the
weather example, the bureau’s weather database is the server, and the mobile app is the client.

Types of Requests or Request Methods characterize what action we are going to take by calling
the API.

There are four main types of actions in total:

•GET: retrieve information (like product information). This is the most common type of
request. By using it, we can get the data we are interested in from API.

•POST: adds new data to the server. By using this type of request you can, for example, add a
new review of a hotel.

•PUT: changes existing information. For example, by using this type of request, it would be
possible to change the text and publication date in an existing blog post.

•DELETE: deletes existing information

6|Page
WEATHER FORECAST

Code:
<?php
$status="";
$msg="";
$city="";
if(isset($_POST['submit'])){
$city=$_POST['city'];
$url="http://api.openweathermap.org/data/2.5/weather?q=$city&appid=ce0253a4a31a854ffcfe4cfede
e6bfb4";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$result=curl_exec($ch);
curl_close($ch);
$result=json_decode($result,true);
if($result['cod']==200){
$status="yes";
}else{
$msg=$result['message'];
}
}
?>

<html lang="en" class=" -webkit-">


<head>
<meta charset="UTF-8">
<title>Weather Card</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Poiret+One);
@import url(https://cdnjs.cloudflare.com/ajax/libs/weather-icons/2.0.9/css/weather-
icons.min.css);
body {
background-color: cadetblue;
font-family: Poiret One;
}
.widget {
position: absolute;
top: 50%;
left: 50%;
7|Page
display: flex;
height: 300px;
width: 600px;
transform: translate(-50%, -50%);
flex-wrap: wrap;
cursor: pointer;
border-radius: 20px;
box-shadow: 0 27px 55px 0 rgba(0, 0, 0, 0.3), 0 17px 17px 0 rgba(0, 0, 0, 0.15);
}
.widget .weatherIcon {
flex: 1 100%;
height: 60%;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
background: #FAFAFA;
font-family: weathericons;
display: flex;
align-items: center;
justify-content: space-around;
font-size: 100px;
}
.widget .weatherIcon i {
padding-top: 30px;
}
.widget .weatherInfo {
flex: 0 0 70%;
height: 40%;
background: darkslategray;
border-bottom-left-radius: 20px;
display: flex;
align-items: center;
color: white;
}
.widget .weatherInfo .temperature {
flex: 0 0 40%;
width: 100%;
font-size: 65px;
display: flex;
justify-content: space-around;
}
.widget .weatherInfo .description {
flex: 0 60%;

8|Page
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
justify-content: center;
margin-left:-15px;
}
.widget .weatherInfo .description .weatherCondition {
text-transform: uppercase;
font-size: 35px;
font-weight: 100;
}
.widget .weatherInfo .description .place {
font-size: 15px;
}
.widget .date {
flex: 0 0 30%;
height: 40%;
background: #70C1B3;
border-bottom-right-radius: 20px;
display: flex;
justify-content: space-around;
align-items: center;
color: white;
font-size: 30px;
font-weight: 800;
}
p{
position: fixed;
bottom: 0%;
right: 2%;
}
pa{
text-decoration: none;
color: #E4D6A7;
font-size: 10px;
}
.form{
position: absolute;
top: 42%;
left: 50%;
display: flex;

9|Page
height: 300px;
width: 600px;
transform: translate(-50%, -50%);
}
.text{
width: 80%;
padding: 10px
}
.submit{
height: 39px;
width: 100px;
border: 0px;
}
.mr45{
margin-right:45px;
}
</style>
</head>
<body>
<div class="form">
<form style="width:100%;" method="post">
<input type="text" class="text" placeholder="Enter city name" name="city" value="<?php echo
$city?>"/>
<input type="submit" value="Submit" class="submit" name="submit"/>
<?php echo $msg?>
</form>
</div>

<?php if($status=="yes"){?>
<article class="widget">
<div class="weatherIcon">
<img src="http://openweathermap.org/img/wn/<?php echo
$result['weather'][0]['icon']?>@4x.png"/>
</div>
<div class="weatherInfo">
<div class="temperature">
<span><?php echo round($result['main']['temp']-273.15)?>°</span>
</div>
<div class="description mr45">
10 | P a g e
<div class="weatherCondition"><?php echo $result['weather'][0]['main']?></div>
<div class="place"><?php echo $result['name']?></div>
</div>
<div class="description">
<div class="weatherCondition">Wind</div>
<div class="place"><?php echo $result['wind']['speed']?> M/H</div>
</div>
</div>
<div class="date">
<?php echo date('d M',$result['dt'])?>

</div>
</article>
<?php } ?>
</body>
</html>

11 | P a g e
5.0Actual Methodology Followed
A)- Project Topic selection:

At the beginning we were confused about selecting Topic for PHP Subject
microproject but after a conversation with subject teacher we made my decision
and select topic Weather Viewer App.

B)- Searching and Collecting Information:

After selecting project topic then we searched lots of information related to test
cases.we was visited more than 5 websites which gave me valuable information
about my Project topic.

C)- Raw Project:

After collecting information about project, we started rough Design,data,


topics,diagram on notebookfor implementing my Idea on project.

D)- Main Project Work On:

After completing and Implementing rough Design,data,topics,diagram on notebook.


Then we started projectin vs code. at one point we were stuck
Because we were unable to sorting information And also, we didn’t have proper
information about Report & Literature Review.

E)-Problem & Doubt Solving:

As we was not able to proceed further in micro project we did brief discussion with
respected subject teacher (Prof. ) ,During conversation Mam gave me
proper instruction and Sequence for project.

F)-Final Stage of Micro project:

After removing errors, we had completed my project and got the proper output.

12 | P a g e
6.0 Actual Resources Used

Sr. Name of Specification Qty. Remarks


No Resource/Materia
l
01 Laptop i3,4GB RAM 1 -
02 Software PyCharm 1 -
03 MS-Word For arranging 1 -

information

13 | P a g e
7.0 Outputs of the micro
Micro project (information) is attached below

• Weather condition of the entered city:

14 | P a g e
Page | 15
8.0 Skill Developed/Learning outcome of this micro project

a) Increased Knowledge on the topic.


b) Vocabulary building.
c) Enhanced team working skill.
d) Enhanced Knowledge about topic.
e) Enhanced Presenting Skill.
f) Spelling Improvement
g) Logic building

Page | 16
9.0 Applications of this micro project: -

a) Enhanced our knowledge which will be helpful in future.


b) Enhanced our many skills
c) Entertainment purpose
d) Solving anagrams.

Page | 17
CONCLUSION
In short, while PHP can be used for developing weather forecasting applications, its
suitability depends on the complexity of the project. While PHP is proficient for web
development and data handling, it may lack the computational efficiency needed for
advanced weather prediction algorithms. However, by leveraging APIs and libraries, PHP
can still be effective for simpler forecasting tasks or integrated within larger software
systems. Combining PHP with other languages optimized for heavy computation, and the
perfect accuracy and performance of weather forecasting applications.

Page | 18

You might also like