This is my first time to try to do, although very rough, but can give the people who need to see, beginners can also go to understand,First on one:Then attach the code: The API request interface here is my interface for the free test of aggregation data request, the total number of times there are 500 times, I write the time is refreshed once will be loaded once, will go to request once.Now the remaining 400 times, anyway, is free, so you can register yourself and then check this API's document
Just started to learn PHP, first written a program, on their own home page, you can show the weather forecast, of course, is not perfect, I hope you give advice. The procedure is as follows:
?
$fcont =file ("http://www.bjmb.gov.cn/today.asp");
$arr =array ();
for ($i =0; $i $tmp = $fcont [$i];
$tmp =ereg_replace ("if (!strstr (Strtolower ($tmp), "img")) {
$tmp =trim (Strip_tags ($tmp));
} else {
$st =ereg_replace (">$stt =split ("⌒", $st);
foreach ($s
Parseweather (Soapobject so) {/** Resolve complex nodes and assign values to the corresponding parameters, preparing for the following method*/The sixth parameter is overview, including date, weather ....String Date=so.getproperty (6). ToString ();Str_weather_today= "Today:" +date.split ("") [0];Str_weather_today=str_weather_today+ "\ n temperature:" +so.getproperty (5). ToString ();Str_weather_today=str_weather_today+ "\ n Wind:" +so.getproperty (7)
window| Program | weather Forecast | This improvement is mainly to increase the image acquisition, and provide a relatively complete function to get the remote file. The specific code is as follows:
?
$fcont =file ("http://www.bjmb.gov.cn/today.asp");
$arr =array ();
for ($i =0; $i $tmp = $fcont [$i];
$tmp =ereg_replace ("if (!strstr (Strtolower ($tmp), "img")) {
$tmp =trim (Strip_tags ($tmp));
} else {
$st =ereg_replace (">$stt =split ("⌒", $st);
for
This example describes the way JS displays calendars and weather. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
The complete code is as follows:
More readers interested in JavaScript-related content can view the site topics: "JavaScript Search Algorithm Skills Summary", "JavaScript animation effects and Skills summary", "JavaScript Error and debugging skills summary", " Java
This project is
and implementation of embedded porting, cross-compiled files and source code has been packaged, download address:
http://download.csdn.net/download/wu9797/10213212
The report (thesis) has been uploaded to Baidu Library:
https://wenku.baidu.com/view/c2975409bdd126fff705cc1755270722192e5912
Where the announcement window looks like this:
The clock window is shown in the following figure:
The weather window looks like the f
Currently, the weather forecast function is often available on the home pages of various websites. How do they achieve this? In fact, this is quite simple. Now the meteorological station, Baidu, Google, youdao, and so on provide us with good service support. We can call it directly.
Currently, there are two main ways to provide services for websites:
1. Plug-ins
This method is relatively simple. You can search for "Free
Example of json parsing Sina Weather interface using javaJson data returned by Sina Weather[ {"CurrentCity": "Xiamen ","Pm25": "64 ","Index ":[ {"Title": "dressing ","Zs": "more comfortable ","Tipt": "Dressing index ","Des": "We recommend that you wear thin coats, denim shirts, and ot
Summer rainy, often outgoing friends are the most concerned about the weather, although the search engine in the weather forecast is very fast, but some people still feel trouble. Can a computer, like a mobile phone, show weather forecasts on the desktop? The answer is certainly, in the Win7 system, we can add weather
Linux Tutorial: how to view weather forecasts under Linux Command lines
Q: I often view weather forecasts on Linux desktops. However, is there a way to query weather forecasts without using a desktop plug-in or a browser in a terminal environment?
For Linux Desktop Users, there are many ways to obtain weather forecasts
The Windows 7 system comes with 9 gadgets, such as CPU Dashboard, weather, clock and currency, among other things, the weather forecast gadget is undoubtedly very important: the next day to go out to wear what clothes, with no umbrella, the weekend is scheduled to go out to play, etc. need to refer to the weather forecast information provided. So, pc6 that many p
The older generation's weather forecasts, whether the medium is newspaper, radio, or television, are annoying. "Jinan, clear, 15 degrees to 27 degrees." Suzhou, overcast to cloudy, 20 degrees to 28 degrees "who listens to be able to not bother?" But in recent years mobile phone weather application has been very good, the designer solved this traditional problem, let the
Php calls yahoosinaapi to develop weather forecasts. The current website will have some service stuff. Such as calendar and weather forecast! Since google permanently closed the Weather api, I found another website that calls weather Pre-events of yahoo and Sina, which will have some services. Such as calendar and
Real-time stock
Google data
1. http://www.google.com/ig/api of real-time data? H1 = ZH-CN stock = 600001
2. K line chart http://www.google.cn/finance/getchart? Q = 600336 X = Sha P = 5d I = 240 http://www.google.com/finance/chart? Q = Sha: 600001 amp; TLF = 12
3. Complete Information "http://www.google.cn/finance/match? Matchtype = matchall q= 600 ".
Yahoo data
1. http://download.finance.yahoo.com/d/quotes.csv of real-time data? S0000600336.ssf0000sl1d1t1c1ohgve0000.csv
2. K line chart htt
Python3 XML: How to Get Yahoo weather, python3xml
Refer to Liao Xuefeng's Python tutorial to implement Linux Python3 to get Yahoo weather
#!/usr/bin/env python3# coding: utf-8import osfrom datetime import datetimefrom urllib import request from xml.parsers.expat import ParserCreate file_name = "weather.txt"for root, dirs, files in os.walk("."): if file_name in files: os.remove(os.path.join(root, file_name)
Document directory
Ii. Design Ideas
Android weather forecast application design (I) I. Demand Analysis
There are already many weather forecasting applications on the Android platform, including well-designed works (such as moji weather ). This article introduces a simple implementation of weather forecasting. This a
Guidance:Webxml.com.cnWeather forecast web service,Data SourceChina Meteorological AdministrationHttp://www.cma.gov.cn/, data is automatically updated every hours. Including weather forecast data for over 340 major Chinese cities and over 60 major foreign cities within three days.This weather forecast web services should not be used for any commercial purposes. If you need it, please contact us and welcome
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.