curl_file_create

The NextScripts: Social Networks Auto-Poster curl file create function.

Description

curl_file_create( (string) $filename, (string) $mimetype = '', (string) $postname = '' ); 

Parameters (3)

0. $filename (string)
The filename.
1. $mimetype — Optional. (string) => ''
The mimetype.
2. $postname — Optional. (string) => ''
The postname.

Usage

  1. if ( !function_exists( 'curl_file_create' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/inc-cl/fl.api.php'; 
  3.  
  4. // The filename. 
  5. $filename = ''; 
  6.  
  7. // The mimetype. 
  8. $mimetype = ''; 
  9.  
  10. // The postname. 
  11. $postname = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = curl_file_create($filename, $mimetype, $postname); 
  15.  

Defined (1)

The function is defined in the following location(s).

/inc-cl/fl.api.php  
  1. function curl_file_create($filename, $mimetype = '', $postname = '') { return "@$filename;filename=" . ($postname ? $postname: basename($filename)) . ($mimetype ? ";type=$mimetype" : '');}