PHP code example of gisostallenberg / curlfile-serializer

1. Go to this page and download the library: Download gisostallenberg/curlfile-serializer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gisostallenberg / curlfile-serializer example snippets




use GisoStallenberg\CURLFileSerializer\CURLFileSerializer;

$curlFileSerializer = CURLFileSerializer::create(new CURLFile('/path/to/file.txt'));
$serialized = serialize($curlFileSerializer);

$curlFileSerializer = unserialize($serialized);
$curlFile = $curlFileSerializer->getCURLFile(); // Is an instanceof CURLFile