search
Homephp教程PHP开发Linux system curl command

Linux system curl command

Mar 23, 2017 pm 03:25 PM
linux

curl command

curl -I URL //-I: Omit the source code to view, the content is as follows:

Linux system curl command

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:

Linux system curl command

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)

Linux system curl command

Linux system curl command

curl -Iv www.baidu.com //v: Display detailed information

Linux system curl command

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

Linux system curl command

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

Server-side PHP generates curl command line

Server-side PHP generates curl command OK

Statement
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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor