本以为GOOGLE会用XML来存放聊天记录
没想到,虽然是XML的思维方式,但是根本不是XML。解析部分还在修改,呵呵~~
<?
require_once('File/Find.php');
class XYGoogleTalkLog
{
var $files;
var $path;
function XYGoogleTalkLog($path)
{
$this->path = $path;
$this->files = File_Find::mapTreemultiple($this->path);
}
function show()
{
header('Content-type: text/html; charset=utf-8');
foreach($this->files as $file)
{
echo $this->decoder($this->path."/".$file);
}
}
function decoder($file)
{
$contents = file_get_contents($file);
return urldecode($contents);
}
}
if (isset($_SERVER['argv']['path']))
{
$path = $_SERVER['argv']['path'];
}
elseif (isset($_GET['path']))
{
$path = $_GET['path'];
}
else
{
echo "Pleas give the parameter path as your Google Talk Log directory.";
exit;
}
$google = new XYGoogleTalkLog($path);
$google->show();
?>


浙公网安备 33010602011771号