Re: PHP cURL to achieve simulation login and collection method of use
file content of data collection based on the content of the collection file, sometimes it needs to be uploaded to the other file server again. At this time, if the local storage is first stored and then submitted to the file server, it is obvious that the IO write and read operation is more than one time, for this case We can use the construction analog upload request header and the construction data message to upload the collected file content directly to the file server:
[code] /**
* @author if
* PHP uploads the file
* @param string $url directly in the file content form using cURL. File upload processing link
* @param array $fileFields file upload data array
* @param array $postFields non file form data array
* @param array $curlOpt extensions E ($url, $fileFields, $postFields = array (), $curlOpt = array ()) {
/ / / construct post data
$data = ';
=' - '.