in solution/solution-ecs-sts-token/code-example/php/sls_sdk/credentials_default_sample.php [42:63]
function putLogs(Aliyun_Log_Client $client, $project, $logstore) {
$topic = 'TestTopic';
$contents = array(
'TestKey'=>'TestContent',
'kv_json'=>'{"a": "b", "c": 19021}'
);
$logItem = new Aliyun_Log_Models_LogItem();
$logItem->setTime(time());
$logItem->setContents($contents);
$logitems = array($logItem);
$request = new Aliyun_Log_Models_PutLogsRequest($project, $logstore,
$topic, null, $logitems);
try {
$response = $client->putLogs($request);
} catch (Aliyun_Log_Exception $ex) {
var_dump($ex);
} catch (Exception $ex) {
var_dump($ex);
}
}