PHP: Uploading multiple images to imgur at once
问题 I've got the following code and it works perfectly fine for uploading one image to Imgur using their API: $client_id = $myClientId; $file = file_get_contents($_FILES["file"]["tmp_name"]); $url = 'https://api.imgur.com/3/image.json'; $headers = array("Authorization: Client-ID $client_id"); $pvars = array('image' => base64_encode($file)); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL=> $url, CURLOPT_TIMEOUT => 30, CURLOPT_POST => 1, CURLOPT_RETURNTRANSFER => 1, CURLOPT