The public platform provides the weather forecast function and the public platform weather forecast.
Weather forecast is a common feature. We can add this feature to our public account.
The content of the weather forecast in this article is obtained from www.webxml.com.cn. I don't know if there are any restrictions. I will use it first. You can also obtain weather forecasts through webservices.
I will first display it in the form of images, and the source code will be provided at the end of the article.
SERVICES_HOST website address
WEATHER_SERVICES_URL weather service address
PROVINCE_CODE_URL: Obtain the province id address
CITY_CODE_URL
WEATHER_QUERY_URL weather query address
Method for obtaining province id
City id Retrieval Method
Obtain weather Methods
The main methods are all above, and there are some other ways to view the attachment