Пример #1
0
/**
 * Skype history displaying examle.
 * Place your main.db file in 'data' directory.
 */
require __DIR__ . '/../vendor/autoload.php';
use Silverslice\SkypeHistory\Reader;
date_default_timezone_set('Asia/Vladivostok');
header('Content-Type: text/html; charset=utf-8');
$url = $_SERVER['PHP_SELF'];
$id = isset($_GET['id']) ? $_GET['id'] : '';
$startDate = isset($_GET['start']) ? strtotime($_GET['start']) : strtotime('-1 year');
$endDate = isset($_GET['end']) ? strtotime($_GET['end']) : time();
$reader = new Reader('data/main.db');
$conversations = $reader->getConversations(strtotime('-10 month'));
$messages = $reader->getHistory($id, $startDate, $endDate);
$conversation = $reader->getConversation($id);
?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Skype history</title>
</head>
<body>
    <style>
        body {
            margin: 20px;
        }
        a {
            color: black;