Http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
Visit http://m.weather.com.cn/data5/city.xmlto get to the first-level list (province, municipality, Autonomous Region)By accessing http://m.weather.com.cn/data5/city+ Province_id +.XML to get the list of county-level citiesBy accessing http://m.weather.com.cn/data5/city+ City_id +.XML to get the city weather forecast information ID
The
There are many weather forecast interfaces, some of which are very complicated. by calling the flash below, you can easily add the weather forecast to your article.Click to view resultsCode: http://download.csdn.net/detail/xwm0008/7635889
is in the cookie containerforeach(System.Net.Cookie CookieinchResponse. Cookies) {Console.WriteLine ("Name: {0}, Value: {1}", cookies. Name, Cookie. Value);} Console.WriteLine (); //you can then get the content of the response in the form of a streamSystem.IO.Stream Receivestream=Response. GetResponseStream (); //You can also wrap a byte stream into a high-level character stream for easy reading of text content//need to be aware of codingSystem.IO.StreamReader Readstream=NewSystem.IO.Stream
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_r
I found that AJAX currently has a problem with cross-origin. It can only be set in IE. So I wrote a simple ASP webService, which is actually a thief program, capture Yahoo's weather and generate XML. Let's start from here. In the future, we will consider adding a database so that the client can read the database quickly after writing it.I am used to writing things with JS. I accidentally wrote ASP all using JS. Haha, I have time to change it to VB.I d
Today, we found that the weather forecast that we added to the previous day, the dark clouds and the Rainbow logo, was not the weather of the day, but the logo of the website (I am so stupid !). In a rage, I threw it away. After walking around for a long time, I finally
Blog of crazy things Find some cool and practical weath
Php + simplexml iov api (2) weather forecast usage
Weather.html page weather. php xml processing page
Results as $ val) {echo''; # Compare the current city with the xml information table, and echo 'City:'. $ val-> currentCity. "weather_data-> dayPictureUrl} '>"; Echo 'time: '. $ data-> date .""; Echo 'temperature: '. $ val-> weather_data-> temperature .""; Echo
Original addressHttp://www.cnblogs.com/ChowYy/p/3382216.html?utm_source=tuicoolutm_medium=referralProject needs, then find the relevant information on the Internet, summarizeThe article on the query Weather API key is to know the city's ID, but according to the method provided by the article, or now the weather bureau to get the city this API to cancel, so, can not get the city ID, fortunately, the article
TodayProgramThe weather forecast query function is provided. First, let's take a look:
Initialization interface. query results
This original is from http://www.anddev.org/, I think it is an error, data is obtained through Google weather API, for example, we enter the following in the browser: http://www.google.com/ig/api?
This example for you to share the PHP micro-letter Baidu Weather Forecast development code for your reference, the specific content as follows
1. Login Baidu AK Application:Http://lbsyun.baidu.com/apiconsole/key
2. Realize Weather information function
baiduweather.php
3. Implementing weather message Eve
PHP obtains the weather forecast for the current day and 72 hours, and generates interface parameters:
City, city ID. for details, see the following table. for example, 212 is Chongqing.
Type, output format, json or xml. the default value is json.
Charset, output character encoding, UTF-8, utf8, or gbk. the default value is UTF-8.
Datetype, date output type, unix or other. the default value is unix timest
This article mainly introduces the example of a semi-transparent weather forecast interface using pyqt4. For more information, see the following code:
#-*-Coding: cp936 -*-Import sysImport urllib2Import jsonFrom PyQt4 import QtCore, QtGuiClass MyWindow (QtGui. QLCDNumber, QtGui. QWidget ):Def _ init _ (self, parent = None ):Super (MyWindow, self). _ init _ (parent)Self. setWindowTitle ("
I often see rolling weather forecasts on the home pages of some websites. Later I found that this was the case. I just added the following code and it was okay.
The following is the weather forecast for Hefei. The specific codes for each city can be found at http://www.tianqi123.com/. the copy code is a convenient tool.
This procedure is a simple crawl Google weather forecast code Oh, previously written are php,asp today I released a JSP get Goolge weather code OH.
Public nodelist Getweatherdiv (String htmlurl) {NodeList res = null;try{Parser Parser = new Parser (htmlurl);Parser.setencoding ("GBK");Nodefilter divfilter = new Nodeclassfilter (div.class);Orfilter lastfilter = new
); Animation.setduration ( Animation.setfillafter (True); Animation.setinterpolator (new Linearinterpolator ());//Modify Animation Run effect/** * Interpolator defines the speed of the animation, which can achieve constant velocity, positive acceleration, negative acceleration, irregular acceleration, etc. acceleratedecelerateinterpolator, delay deceleration, when the action is performed in the middle of the time to perform the effect. Accelerateinterpolator, will make the parameter slowly to (f
. Net use WebService to obtain the Weather Forecast Time: 11:46:45 Source: Network Author: Unknown CLICK: 633 times
(1) create a new website and name it weatherservice
(2) Right-click the program root directory, add web reference, fill in the service address: http://www.ayandy.com/Service.asmx,
Enter OBJ in the Web reference name and add the reference.
(3) write in the default. aspx page:
Province:
(4) wri
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.