PHP_CURL1-POST login simulation _ PHP Tutorial

Source: Internet
Author: User
Tags gopher
Simulate POST login with PHP_CURL1. CURL introduction: CURL allows you to use various types of protocols to connect and communicate with various servers. Currently, the supported protocols include http, https, ftp, gopher, telnet, dict, file, CURL introduction:

CURL allows you to use various protocols to connect and communicate with various servers. Currently, the supported protocols include http, https, ftp, gopher, telnet, dict, file, and ldap, it also supports HTTPS authentication, http post, http put, and FTP upload (this can also be completed through the FTP extension of PHP) HTTP form-based Upload, proxy, cookies, user name + password authentication. (From manual)

In short, CURL is very powerful and can implement functions that many file_get_contents functions cannot implement.

I will not go into details about the principles here.

CURL simulated login:

First, create two files in your project: login. php (submit for login), validate. php (verify), and code list:

Login. php

 Validate. php

  
Login successful. "login successful" is displayed in JS. login failed, and "login failed" is displayed in JS ".

Note: Original article, reproduced please indicate the source: http://blog.csdn.net/liruxing1715/article/details/18551621

CURL allows you to use various protocols to connect and communicate with various servers. Currently, the supported protocols include: http, https, ftp, gopher, telnet, dict, file ,...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.