# imagify/1.3.5.1/inc/compat.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 1.3.5.1. 20 lines.

- Page: https://pluginprobe.com/plugins/imagify/1.3.5.1/code/inc/compat.php
- Raw: https://pluginprobe.com/plugins/imagify/1.3.5.1/raw/inc/compat.php
- Modified: 2016-01-27T15:07:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/1.3.5.1/code/inc/compat.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );

/**
 * Create a CURLFile object.
 *
 * @since PHP 5.5
 *
 * @param 	string $filename  Path to the file which will be uploaded.
 * @param 	string $mimetype  Mimetype of the file.
 * @param 	string $postname  Name of the file to be used in the upload data.
 * @return string 			  The CURLFile object.
 */
if ( ! function_exists( 'curl_file_create' ) ) {
    function curl_file_create( $filename, $mimetype = '', $postname = '' ) {
        return "@$filename;filename="
            . ( $postname ? $postname : basename( $filename ) )
            . ( $mimetype ? ";type=$mimetype" : '' );
    }
}
```
