$key = substr(md5($host), 0, 4);
$cookie_key = $key."_ru";
$cookie_val = base64_encode('1@'.$password);
$data = '';
$data .= "GET /index.php HTTP/1.1\r\n";
$data .= "Host: $host\r\n";
$data .= "Accept: textml,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
$data .= "Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7\r\n";
$data .= "Cookie: {$cookie_key}_city=1; cnzz_a2262318=3; sin2262318=; rtime=0; ltime=$time; cnzz_eid=19056328-1285688892-; $cookie_key=$cookie_val\r\n";
$data .= "Connection: Close\r\n\r\n";
$fp = fsockopen($host, 80);
fputs($fp, $data);
$res = '';
while($fp && !feof($fp))
{
$res .= fread($fp, 1024);
}
fclose($fp);
$session_id = getSessionId($res);
if($session_id)return $session_id;
else return false;
求破