Jump to content
Chinese-forums.com
Learn Chinese in China

  • Why you should look around

    Since 2003, Chinese-forums.com has been helping people learn Chinese faster and get to China sooner. Our members can recommend beginner textbooks, help you out with obscure classical vocabulary, and tell you where to get the best street food in Xi'an. And we're friendly about it too. 

    Have a look at what's going on, or search for something specific. We hope you'll join us. 
Sign in to follow this  
tetsuo500

Tencent qq (Chinese icq)

Recommended Posts

Chappie

Google has a translation section? I know altavista has one... babelfish...

Its still slow.. I think its the website. Its " too" heavy for my connection.

sending queries aint that hard :P I hacked a SMS service once :D. But the securcity was really crap

Share this post


Link to post
Share on other sites
Site Sponsors:
Pleco for iPhone / Android iPhone & Android Chinese dictionary: camera & hand- writing input, flashcards, audio.
Study Chinese in Kunming 1-1 classes, qualified teachers and unique teaching methods in the Spring City.
Learn Chinese Characters Learn 2289 Chinese Characters in 90 Days with a Unique Flash Card System.
Hacking Chinese Tips and strategies for how to learn Chinese more efficiently
Popup Chinese Translator Understand Chinese inside any Windows application, website or PDF.
Chinese Grammar Wiki All Chinese grammar, organised by level, all in one place.

browny

hehe cool man~! I know sending queries aren't that hard..hehe~ :oops:

As for the speed problem, if you know a good (free) web host in europe, tell me, and i'll put the website up there too.

Share this post


Link to post
Share on other sites
Chappie

there are many places to set up one...

butta could you give me the code for that? Im too lazy to create my "own" translation program :)

Share this post


Link to post
Share on other sites
browny

you want the php code to interface the google translator? OK, here is the code that you will need:

/**

* Get a remote file using POST

*

* $url String The url which locates the server, port number, and file.

* $_query String The dat to be sent with the header

* returns String the body of the file if successfull

*/

function fetchURL( $url, $_query ) {

$url_parsed = parse_url($url);

$host = $url_parsed["host"];

$port = $url_parsed["port"];

if ($port==0)

$port = 80;

$path = $url_parsed["path"];

$out = "POST $path HTTP/1.0rn";

$out .= "Host: $hostrn";

$out .= "Content-length: " . strlen($_query) . "rnrn";

$out .= $_query . "rn";

$fp = fsockopen($host, $port, $errno, $errstr, 30);

fwrite($fp, $out);

$body = false;

while (!feof($fp)) {

$s = fgets($fp, 1024);

if ( $body )

$in .= $s;

if ( $s == "rn" )

$body = true;

}

fclose($fp);

return $in;

}

/**

* Tranlate English to Chinese (GB2312)

* Uses http://translate.google.com/translate_t

*

* $text String The English to be translated

* returns String Chinese (GB2312) translated from $text

*/

function translateEnglishToChinese( $text ) {

$data = fetchURL("http://translate.google.com/translate_t", "text=$text&langpair=en%7Czh-CN");

list($junk, $data) = split('', $data);

return $translation;

}

/**

* Tranlate Chinese (GB2312) to English

* Uses http://translate.google.com/translate_t

*

* $text String The Chinese (GB2312) to be translated

* returns String English translated from $text

*/

function translateChineseToEnglish( $text ) {

$data = fetchURL("http://translate.google.com/translate_t", "text=$text&langpair=zh-CN%7Cen");

list($junk, $data) = split('', $data);

return $translation;

}

Share this post


Link to post
Share on other sites
Chappie

I cant read php... though...

I can read Java :P

But it doesnt output a textfield in php

Share this post


Link to post
Share on other sites
Nings

who want a QQ number?

You can login the follow FREE number in 24 hours:

442021207----qCKXzUqDatyTalN

346429594----ZHfOzxsYcTANfVG

412236646----4LOCYsrWYFqEZB3

379861807----3eUucoVyCWNUMhA

287687318----znEDAVdDXc4MkPL

Remember change the password to your own . Extra questions please contact me .

[email protected]

Share this post


Link to post
Share on other sites
twilighthush

Does anyone have a problem with sending messages through QQ? Tonight, when I tried to send messages, I kept getting something like this:

Last sent message: ": " failed to send(server timeout).

I'm in the United States. Any clue what's going on?

Share this post


Link to post
Share on other sites
twilighthush

T_T;

Jesus.

Thank GOD I live in America.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...