/** * Close a cURL share handle * * @return void */ public function close() { if ($this->_sh) { curl_share_close($this->_sh); $this->_sh = null; } }
public function __destruct() { // 关闭 CURL 共享载体 if ($this->curls) { curl_share_close($this->curls); } }
/** * Close a cURL share handle * * @param void * @return void */ public final function curlShareClose() { curl_share_close($this->curl_share_handle); }
function __destruct() { curl_share_close($this->shareDescriptor); $this->cookie->deleteOldFiles(); }
public function __destruct() { if (isset($this->sh)) { curl_share_close($this->sh); } curl_multi_close($this->mh); }
/** * @see curl_share_close() * * @return void */ public function __destruct() { curl_share_close($this->handle); }
public function close() { return curl_share_close($this->resource); }
fwrite(STDERR, "Could not get compatible versions\n"); curl_share_close($sh); exit(1); } $compatible = 0; for ($x = 0; $x < $c; $x++) { if (intval($res[1][$x]) > $compatible) { $compatible = $res[1][$x]; } } fwrite(STDERR, "Compatible: {$compatible}\n"); if (preg_match('/<textarea name="message"[^>]+>([\\w\\W]+?)<\\/textarea>/', $html, $res) == 0) { fwrite(STDERR, "Could not get description\n"); curl_share_close($sh); exit(1); } $description = $res[1]; fwrite(STDERR, "Description: {$description}\n"); $curl = curl_init(); $f = new CURLFile($zipPath, 'application/x-zip-compressed', 'TheUndermineJournal.zip'); curl_setopt_array($curl, [CURLOPT_SHARE => $sh, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_URL => 'http://www.wowinterface.com/downloads/editfile.php', CURLOPT_POSTFIELDS => ['replacementfile' => $f, 'archiveold' => 1, 'ftitle' => 'The Undermine Journal', 'version' => $version, 'wysiwyg' => 0, 'message' => $description, 'changelog' => 'Automatic data update for ' . date('l, F j, Y'), 'donatepage' => '', 'compatible[]' => $compatible, 'overlaytype' => 0, 'overlaysid' => 0, 'allowpa' => 1, 'certify' => 'yes', 'docertify' => 'yes', 's' => '', 'securitytoken' => $securityToken, 'op' => 'editfile', 'id' => '19662', 'type' => 0, 'sbutton' => 'Update AddOn']]); $html = curl_exec($curl); curl_close($curl); if (strpos($html, 'The file has been updated.') === false) { fwrite(STDERR, "Some upload error:\n{$html}\n"); curl_share_close($sh); exit(1); } fwrite(STDERR, "WoW Interface update successful.\n"); curl_share_close($sh);