U
U
Uniq2017-08-05 22:32:03
PHP
Uniq, 2017-08-05 22:32:03

Uploading images vk api, how to upload without saving to the server?

Hello.
If you send a picture from the server via curl_file, everything is OK,
if you get the picture into a variable and send it, we get an error, apparently curl is looking for a file but it is not there.

$img_real_path = file_get_contents($url_image);
$curl_file = curl_file_create($img_real_path,'image/jpg','test_name.jpg');

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question