How to add a weather forecast on the website

How to add a weather forecast on the website

Digital Hits: 67

Adding of a weather forecast on the website can be carried out in two ways: by means of installation on the website of a special script of weather or by copying of the code of a weather informer from one of the popular services providing similar banners for webmasters.

Installation of an informer



Integration of the code of an informer on the website is the easiest way for creation of function of the weather report on the website. Before copying of the code decide on functionality of service of weather on your resource: whether the banner will display only the current weather for a certain city or the element will give the complete information about the forecast depending on location of the user who visited the website. Among services which free of charge provide weather banners to webmasters it is possible to note "Yandex. Weather", GISMETEO and RP5. Each of resource data is represented to configure settings of future informer and as the image will look on your resource. You will also be able to pick up the necessary color scheme, the shown information volume and banner size.

Having selected a resource, suitable for creation of service of weather, and having exposed necessary settings, copy the code received in the corresponding text HTML and JS window. This script should be inserted on any page of your website on which you would like to include display of weather.

 

To insert the code, open your HTML or the PHP page in the text editor used by you. You can also execute adding of the code via the control panel of your hosting according to the functions offered in it. If you do not know how to execute adding of the code, contact support desk of your hoster for obtaining information on editing web pages via the interface of the control panel.

Having added the code, execute saving the applied parameters and check operability of the forecast on your page. If adding of the counter was executed correctly, you will see the banner which is earlier configured by you.

Installation through a script



On the websites for webmasters you can also load a ready script which will download information from other Internet resources depending on location of the user. Advantage of installation of a script is the possibility of its independent editing and fine tuning.

Pick up the script suitable on functionality on the websites with programs for webmasters. Extract the received package on the computer and start the document readme.txt. Study the installation instruction of a script and follow the designated instructions. Installation process can change depending on features of the written program. However is normal for creation of the interface of display of weather on a resource enough to copy a decompressed script in a separate directory on a hosting, to pass by means of the browser into this directory and to specify the settings.php file. Having performed tuning, you will need to insert the generated code on the page where you want to display the forecast. If the script displays extensive information on weather on the separate page, you will need to create the reference in the menu of the website.

For many modern CMS there are additional modules allowing to activate display of weather on pages. To find suitable expansion, study the directory of available modules on the website of your management system of the websites or run for search of expansion of weather via the panel of administration of your resource.

Author: «MirrorInfo» Dream Team

Print