Ticket #3857: 3857upstream.diff
File 3857upstream.diff, 1.3 KB (added by , 18 years ago) |
---|
-
wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php
78 78 $header .= $xml; 79 79 //$this->_debugData($xml); 80 80 81 // Use raw sockets 82 $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30); 83 if ($fp) { 84 // Send request 85 fwrite($fp, $header); 86 87 // Read response 88 $xml = ""; 89 while (!feof($fp)) 90 $xml .= fgets($fp, 128); 91 92 fclose($fp); 93 } else { 81 // Use curl if it exists 82 if (function_exists('curl_init')) { 94 83 // Use curl 95 84 $ch = curl_init(); 96 85 curl_setopt($ch, CURLOPT_URL,$url); … … 99 88 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 100 89 $xml = curl_exec($ch); 101 90 curl_close($ch); 91 } else { 92 // Use raw sockets 93 $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30); 94 if ($fp) { 95 // Send request 96 fwrite($fp, $header); 97 98 // Read response 99 $xml = ""; 100 while (!feof($fp)) 101 $xml .= fgets($fp, 128); 102 103 fclose($fp); 104 } else 105 echo "Could not open SSL connection to google."; 102 106 } 103 107 104 108 //$this->_debugData($xml);