codeminders / imageshackapi

Automatically exported from code.google.com/p/imageshackapi
0 stars 0 forks source link

uploadAndPost error: 2003 Failed to update your status #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
uploadAndPost API call with russian/intl text cause 2003 error or curl
timeout error without any valid xml reply.

the code to reproduce:

$postfields = array();
$postfields['username'] = $username;
$postfields['password'] = $password;
$postfields['message']  = $message;
$postfields['media']    = '@'.$localfn;
$postfields['key'] = '02-my-dev-key-8e6ae6c';

$method = 'http://yfrog.com/api/uploadAndPost';

        $curl = curl_init();
        curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
        curl_setopt($curl, CURLOPT_TIMEOUT, 25);
        curl_setopt($curl, CURLOPT_HEADER, false);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_BINARYTRANSFER, 1);
        curl_setopt($curl, CURLOPT_URL, $method);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
        $curlresult = curl_exec($curl);
        curl_close($curl);

        //Parse XML responce
        try
        {
            $rxml = new SimpleXMLElement($curlresult);
...

Original issue reported on code.google.com by okerta...@gmail.com on 30 Jul 2009 at 12:00

GoogleCodeExporter commented 9 years ago
I think perhaps encoding is not set correctly. Our API support non-ascii. 
Example post:

http://twitter.com/vzalivatest/status/3233234278

Could you do TCP dump of the request you are sending?

Original comment by kroko...@gmail.com on 10 Aug 2009 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by kroko...@gmail.com on 10 Aug 2009 at 10:09

GoogleCodeExporter commented 9 years ago
yes, close please. can't reproduce it again.

Original comment by okerta...@gmail.com on 12 Aug 2009 at 8:02