Home Backend Development PHP Tutorial 求php抓取网站天气代码,该如何处理

求php抓取网站天气代码,该如何处理

Jun 13, 2016 pm 01:40 PM
com data weather

求php抓取网站天气代码
求php抓取网站天气代码

------解决方案--------------------
基本上都有接口的,新浪的,腾讯的等等
http://www.weather.com.cn/data/sk/101110101.html
http://m.weather.com.cn/data/101110101.html
等等
其中101110101是城市的代码,获得城市代码进入weather.com.cn
------解决方案--------------------

探讨

基本上都有接口的,新浪的,腾讯的等等
http://www.weather.com.cn/data/sk/101110101.html
http://m.weather.com.cn/data/101110101.html
等等
其中101110101是城市的代码,获得城市代码进入weather.com.cn

------解决方案--------------------
貌似几乎所有的这类工具都是这么抓的,voteon83 我一般也不告诉你..哈哈哈
探讨

引用:

基本上都有接口的,新浪的,腾讯的等等
http://www.weather.com.cn/data/sk/101110101.html
http://m.weather.com.cn/data/101110101.html
等等
其中101110101是城市的代码,获得城市代码进入weather.com.cn


+1,其实很多天气……

------解决方案--------------------
探讨
貌似几乎所有的这类工具都是这么抓的,voteon83 我一般也不告诉你..哈哈哈

引用:

引用:

基本上都有接口的,新浪的,腾讯的等等
http://www.weather.com.cn/data/sk/101110101.html
http://m.weather.com.cn/data/10111010……

------解决方案--------------------
有现成的接口供网页嵌入,何苦抓过来抓过去
------解决方案--------------------
探讨

有现成的接口供网页嵌入,何苦抓过来抓过去

------解决方案--------------------
http://6shandong.com/123/weatherplugin.html
------解决方案--------------------
$source = file_get_contents("http://www.weather.com.cn/data/cityinfo/".$carr[1].".html");
$obj=json_decode($source);
echo $obj->weatherinfo->city.' '.$obj->weatherinfo->weather.' '.$obj->weatherinfo->temp1.'~'.$obj->weatherinfo->temp2;
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hongmeng native application random poetry Hongmeng native application random poetry Feb 19, 2024 pm 01:36 PM

To learn more about open source, please visit: 51CTO Hongmeng Developer Community https://ost.51cto.com Running environment DAYU200:4.0.10.16SDK: 4.0.10.15IDE: 4.0.600 1. To create an application, click File- >newFile->CreateProgect. Select template: [OpenHarmony] EmptyAbility: Fill in the project name, shici, application package name com.nut.shici, and application storage location XXX (no Chinese, special characters, or spaces). CompileSDK10, Model: Stage. Device

What is the difference between comcn and com What is the difference between comcn and com May 12, 2023 pm 04:08 PM

The difference between comcn and com: 1. There are differences between comcn and com in terms of meaning, but there is no difference in access speed; 2. comcn is an international domain name and is a global top-level domain name for use by commercial institutions, while cn is a Chinese company domain name , domestic commercial institutions, domestic domain names, only enterprises can register; 3. The search priority is that cn will search for .cn first. After finding the .cn server, the .cn server will then search for .com; 4. cn is provided by cnnic China Internet Center Management, com's management organization is abroad.

What data is in the data folder? What data is in the data folder? May 05, 2023 pm 04:30 PM

The data folder contains system and program data, such as software settings and installation packages. Each folder in the Data folder represents a different type of data storage folder, regardless of whether the Data file refers to the file name Data or the extension. Named data, they are all data files customized by the system or program. Data is a backup file for data storage. Generally, it can be opened with meidaplayer, notepad or word.

What to do if mysql load data is garbled? What to do if mysql load data is garbled? Feb 16, 2023 am 10:37 AM

The solution to the garbled mysql load data: 1. Find the SQL statement with garbled characters; 2. Modify the statement to "LOAD DATA LOCAL INFILE "employee.txt" INTO TABLE EMPLOYEE character set utf8;".

AI project failure rates top 80% — study cites poor problem recognition and a focus on latest tech trends among major problems AI project failure rates top 80% — study cites poor problem recognition and a focus on latest tech trends among major problems Aug 31, 2024 am 12:59 AM

Everyone and their aunt seem to be hopping aboard the AI train in search of inflated profit margins and marketing hype — just look at AMD's recent Ryzen rebrand as a prime example of this AI hype. A recent study conducted by RAND has found that this

What are the differences between xdata and data What are the differences between xdata and data Dec 11, 2023 am 11:30 AM

The differences are: 1. xdata usually refers to independent variables, while data refers to the entire data set; 2. xdata is mainly used to establish data analysis models, while data is used for data analysis and statistics; 3. xdata is usually used for regression Analysis, variance analysis, predictive modeling, data can be analyzed using various statistical methods; 4. xdata usually requires data preprocessing, and data can contain complete original data.

MySQL writes crazy error logs MySQL writes crazy error logs Feb 18, 2024 pm 05:00 PM

A core business database, the version is MySQL8.34 Community Server Edition. Since its launch, the error log of this database server has increased very rapidly (as shown in the figure below), and can increase to more than 10 G in capacity every 24 hours. Because there was a fault alarm and normal access to the business had not been affected, the relevant personnel were not allowed to restart the MySQL service. In view of this situation, I had to set up an automatic scheduled task to clean these logs at a fixed time every night. For specific operations, execute "crontab -e" on the system command line and add the following text line: 0001***echo>/data/mysql8/data/mysql_db/mysql.log Save and exit edit mode

Can't data in vue component be a function? Can't data in vue component be a function? Dec 19, 2022 pm 05:22 PM

No, data in the vue component must be a function. Components in Vue are used for reuse. In order to prevent data reuse, they are defined as functions. The data data in the vue component should be isolated from each other and not affect each other. Every time the component is reused, the data data should be copied once. Later, when the data data in the component is changed in a reused place, other data will be copied. If the data data of reused local components is not affected, you need to return an object as the status of the component through the data function.

See all articles