curl command
curl -I URL //-I: Omit the source code to view, the content is as follows:
We are looking at the line HTTP/1.1 200 OK
Are there common states: 200 301 302 404 403 502 503
Among the above status codes, only 200 is OK
If 301 302 appears, it may be because a jump is set on the server side, the content is as follows:
The above picture shows the HTTP/1.1 301 setting Jump to the following: Location: http://www.aminglinux.com/bbs/forum.php
-x You can specify the ip and port, omitting to write hosts:
curl -x ip:port (port ) URL -I
curl -x61.135.157.156:80 www.qq.com -I
//( -I is used to only view the status code, not the source code, -x: proxy)
curl -Iv www.baidu.com //v: Display detailed information
User-Agent here: represents an identifier of the browser
curl -O URL (to download pictures) URL) //-O: Directly download the page or object
curl -o Custom name URL (the URL to download the image) //-o: Rename
curl -u user:password http:// 123.com //-u : Username and password can be specified
Related articles:
Use Curl command to view request response time method