4 +-----------------------------------------------------------------------+
5 | program/steps/mail/spell.inc |
7 | This file is part of the RoundCube Webmail client |
8 | Copyright (C) 2005, RoundCube Dev. - Switzerland |
9 | Licensed under the GNU GPL |
12 | Submit request to Google's spell checking engine |
15 | Script from GoogieSpell by amix.dk |
17 +-----------------------------------------------------------------------+
18 | Author: Thomas Bruederli <roundcube@gmail.com> |
19 +-----------------------------------------------------------------------+
21 $Id: spell.inc 265 2006-06-25 10:04:45Z thomasb $
25 $REMOTE_REQUEST = TRUE;
27 $google = "ssl://www.google.com";
29 $lang = $_GET['lang'];
30 $path = "/tbproxy/spell?lang=$lang";
31 $data = file_get_contents('php://input');
34 if ($fp = fsockopen($google, $port, $errno, $errstr, 30))
36 $out = "POST $path HTTP/1.0\r\n";
37 $out .= "Host: $google\r\n";
38 $out .= "Content-Length: " . strlen($data) . "\r\n";
39 $out .= "Content-type: application/x-www-form-urlencoded\r\n";
40 $out .= "Connection: Close\r\n\r\n";
45 $store .= fgets($fp, 128);