Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array('name' => 'hehe', 'age' => 20));
- $args['file'] = new CurlFile(realpath('download.jpg'), 'image/jpg');
- //curl_file_create('download.jpg', 'application/octet-stream', realpath('download.jpg'));
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
Advertisement
Add Comment
Please, Sign In to add comment