CURLStringFile
class CURLStringFile (View source)
CURLStringFile makes it possible to upload a file directly from a variable. This is similar to CURLFile, but works with the contents of the file, not filename. This class or CURLFile should be used to upload the contents of the file with CURLOPT_POSTFIELDS.
Properties
| string | $data | ||
| string | $mime | ||
| string | $postname |
Methods
__construct(string $data, string $postname, string $mime = 'application/octet-stream')
Create a CURLStringFile object
Details
__construct(string $data, string $postname, string $mime = 'application/octet-stream')
Create a CURLStringFile object
Creates a CURLStringFile object, used to upload a file with CURLOPT_POSTFIELDS.