| | |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/utils/spell_html_googie.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | $store = ''; |
| | | if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) { |
| | | $out = "POST $path HTTP/1.0\r\n"; |
| | | $out .= "Host: $host\r\n"; |
| | | $out .= "Host: " . str_replace('ssl://', '', $host) . "\r\n"; |
| | | $out .= "Content-Length: " . strlen($data) . "\r\n"; |
| | | $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; |
| | | $out .= "Connection: Close\r\n\r\n"; |
| | |
| | | $result['result'][] = mb_substr($wordstr, $matches[$i][1], $matches[$i][2], RCMAIL_CHARSET); |
| | | } |
| | | else if ($request['method'] == 'getSuggestions') { |
| | | $suggestions = explode("\t", $matches[0][4]); |
| | | if (sizeof($suggestions)>MAX_SUGGESTIONS) |
| | | $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS); |
| | | $result['result'] = $suggestions; |
| | | if ($matches[0][4]) { |
| | | $suggestions = explode("\t", $matches[0][4]); |
| | | if (sizeof($suggestions)>MAX_SUGGESTIONS) |
| | | $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS); |
| | | $result['result'] = $suggestions; |
| | | } |
| | | else |
| | | $result['result'] = array(); |
| | | } |
| | | |
| | | // send output |