如何在php中解码sqlite3格式文件(二进制)资源

如何在php中解码sqlite3格式文件(二进制)资源,php,sqlite,Php,Sqlite,我正在开发一个web解决方案,允许用户查看在线sqlite3格式文件(例如)。现在我正在使用php,并成功地获得了带有代码的资源: $url ="http://xxxxx.AgentStatistic.csv.sqlite3"; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_setopt($ch,

我正在开发一个web解决方案,允许用户查看在线sqlite3格式文件(例如)。现在我正在使用php,并成功地获得了带有代码的资源:

$url ="http://xxxxx.AgentStatistic.csv.sqlite3";
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
这将返回二进制代码,可以这样查看,一个长字符串(代码不可读):

结果包括我需要的信息,但不可读,格式不好。
我的问题:有没有一种方法可以根据我现有的代码正确地解码sqlite3资源?或者有其他语言的其他解决方案?

为什么不将其写入文件并告诉SQLite库打开它?您指的是什么格式的文件(我猜是.db,但我不知道如何操作)?哪个SQLite库?我找不到一个可以处理.sqlite3的库。如果你能说出它的名字,我将不胜感激。它确实解决了我的问题。谢谢你!
SQLite format 3@  -â!     iiƒSS…tableLitevsocial_reports_agentStatisticsLitevsocial_reports_agentStatisticsCREATE TABLE Litevsocial_reports_agentStatistics (reportTime,conversationId,dayPeriod,weekPeriod,monthPeriod,yearPeriod,agent,groupUser,dayLogin,weekLogin,monthLogin,yearLogin,assignedTo,assignedBy,composePublish,composeDraft,replyPublish,replyDraft,closed,waitingTime,slaReply,slaReplyOutside,slaClosed,slaClosedOutside)       Î ûöñìçâÝØÓÎ\S J A8/& /˜7Öu³Rñ/_ 3 +2013-06-03 17:43:3972579thisYearChris 00002000000112080160001_   3 +
.....(all rows with unreadable code like the first line)