ESP8266简单爬取baidu网页源码
/* * This sketch demonstrates how to set up a simple HTTP-like server. * The server will set a GPIO pin depending on the request * http://server_ip/gpio/0 will set the GPIO2 low, * http://server_ip/gpio/1 will set the GPIO2 high * server_ip is the IP address of the ESP8266 module, will be * printed to Serial when the module is connected. */ # include <ESP8266WiFi.h> const char * ssid = "MERCURY_5038" ; //wifi名称 const char * password = "00001111" ; //wifi密码 const char * host = "www.baidu.com" ; WiFiServer server ( 80 ) ; //开启80端口 void setup ( ) { Serial . begin ( 115200 ) ; //开启串口监视器 delay ( 10