@mawenzi
versuche mal dieser sockspell.php
<?php
/**
* sockspellphp - php proxy for googiespell
*
* @author: Andreas Krapohl [larsneo]
* @link http://www.krapohl.info
* @credits: Marcin 'nosferathoo' Puchalski
* @credits: Johan Sijbesma
* @credits: James Edgington
* @credits: Stephen Wald
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
*/
// get (and sanitize) $lang from GPC
$lang=strip_tags($_GET['lang']);
$lang=substr($lang, 0, 2);
// set enviroment
$google = 'www.google.com';
$path="/tbproxy/spell?lang=$lang";
$data = file_get_contents('php://input');
// create a new curl resource
$curl_handle = curl_init();
// URL: Host und Pfad via HTTPS (= SSL)
curl_setopt($curl_handle, CURLOPT_URL, 'https://'.$google.$path);
// Port
curl_setopt($curl_handle, CURLOPT_PORT, 443);
// Prüfung des SSL-Zertifikats abschalten
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);
// curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST, false);
// kein Header in der Ausgabe
// curl_setopt($curl_handle, CURLOPT_HEADER, false);
// HTTP-Version 1.1
curl_setopt($curl_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
// POST-Request
// curl_setopt($curl_handle, CURLOPT_POST, true);
$curl_headers = array('Host: '.$google,
'Content-Type: application/x-www-form-urlencoded',
'Content-Length: '.strlen($data),
'Connection: Close');
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $curl_headers);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl_handle, CURLOPT_POSTFIELDSIZE, strlen($data));
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_handle, CURLOPT_TIMEOUT, 30);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
// Request durchführen und Output einlesen
$store = curl_exec($curl_handle);
if (0 == curl_errno($curl_handle)) {
curl_close($curl_handle);
}
// print response
print $store;
?>