问题描述
array (size=9) 'action' => string 'get' (length=3) 'params' => array (size=3) 'cursor' => array (size=1) 0 => string 'LTExOTc5ODMxMzc6Z0drQUFRTUFnR2tBQmdGU0xfUENzZ0NBZFFBUU5jbVF6cmhERWVXTzlMSEpWVU9zT1FDQWRRQVFOY21ReExoREVlV0dzYkZhMkR1XzRnQQ' (length=122) 'limit' => array (size=1) 0 => string '10' (length=2) 'ql' => array (size=1) 0 => string 'select * where timestamp>1435536480000' (length=38) 'path' => string '/chatmessages' (length=13) 'uri' => string 'http://a1.easemob.com/xdl/cg/chatmessages' (length=44) 'entities' => array (size=10) 0 => array (size=11) 'uuid' => string '3ecd9c6a-b843-11e5-890d-0b136cf3dec2' (length=36) 'type' => string 'chatmessage' (length=11) 'created' => float 1452503466065 'modified' => float 1452503466065 'timestamp' => float 1452503465414 'from' => string '11974' (length=5) 'msg_id' => string '150060425273152128' (length=18) 'to' => string '1452503416784' (length=13) 'groupId' => string '1452503416784' (length=13) 'chat_type' => string 'groupchat' (length=9) 'payload' => array (size=2) ... 1 => array (size=11) 'uuid' => string '3f6a037a-b843-11e5-aabb-2933387c67ed' (length=36) 'type' => string 'chatmessage' (length=11) 'created' => float 1452503467090 'modified' => float 1452503467090 'timestamp' => float 1452503466806 'from' => string '11974' (length=5) 'msg_id' => string '150060431212282496' (length=18) 'to' => string '1452503416784' (length=13) 'groupId' => string '1452503416784' (length=13) 'chat_type' => string 'groupchat' (length=9) 'payload' => array (size=2) ... 'timestamp' => float 1453511703847 'duration' => int 62 'cursor' => string 'LTExOTc5ODMxMzc6ZdGU01BSUdiQUNBZFFBUVlyVXd29ELU15cHVxX0FDQWRRQVFZclFQcExoRkVlV0Uwbzg3dVVHOWx3QQ' (length=122) 'count' => int 10/*导出聊天记录---分页*/function getChatRecordForPage($ql,$limit=0,$cursor){if(!empty($ql)){$url=$this->url.'chatmessages?ql='.$ql.'&limit='.$limit.'&cursor='.$cursor;}$header=array($this->getToken());$result=$this->postCurl($url,'',$header,"GET");$cursor=$result["cursor"];$this->writeCursor("chatfile.txt",$cursor);//var_dump($GLOBALS['cursor'].'00000000000000');return $result;}$ql="select+*+where+timestamp>1435536480000";$cursor=$h->readCursor("chatfile.txt");var_dump($h->getChatRecordForPage($ql,10,$cursor));
解决方案
你怎么调用的接口,我这边可以导出来啊{ "action": "get", "path": "/chatmessages", "uri": "http://a1.easemob.com/gdpwq123 ... ot%3B, "entities": [ { "uuid": "291fd17a-bb5a-11e5-9d83-2fb652ae9b0c", "type": "chatmessage", "created": 1452843161607, "modified": 1452843161607, "timestamp": 1452843160588, "from": "0n9td21510", "msg_id": "151519404918571512", "to": "6", "chat_type": "chat", "payload": { "bodies": [ { "type": "txt", "msg": "这个我应该穿什么号的?我身高165,体重46kg" } ], "ext": { "weichat": { "queueName": "shouqian", "visitor": { "phone": "13512345678", "userNickname": "0n9td21510", "companyName": "环信", "trueName": "0n9td21510", "email": "abc@123.com", "description": "", "qq": "10000" } } } } },