Esempio n. 1
0
<?php

/**
 * 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;
        }
Esempio n. 2
0
<?php

/**
 * Skype history search 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');
$messages = [];
$query = isset($_POST['search_query']) ? $_POST['search_query'] : '';
if ($query) {
    $reader = new Reader('data/main.db');
    $messages = $reader->findInHistory($query);
}
?>

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