Home > Article > Backend Development > php CURL does not use file access COOKIE example_PHP tutorial
This article will introduce you to an example of php CURL not using COOKIE for file access. I hope this instruction will be helpful to all students.
CURL is a very practical PHP extension. It is often necessary to access COOKIE information when simulating user login. Using COOKIEJAR and COOKIEFILE will generate two or more I/O operations. Needless to say, performance efficiency is discussed in Chapter 1. Third-party cloud application platforms (BAE SAE, etc.) sometimes need to operate STORAGE to access COOKIE, which is troublesome. Today I will introduce a CURL method to access COOKIE without using files:
COOKIEJAR/COOKIEFILE method:
The code is as follows
|
Copy code
|
||||
|
$url = 'www.bKjia.c0m'; //url address
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); //Return the obtained output text stream