Created
March 28, 2016 22:05
-
-
Save ahsankhatri/308c025b0e26bbd80d0b to your computer and use it in GitHub Desktop.
Read your Skype chats with the help of PHP PDO Driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// replace ahsanyousuf with your users | |
$dbPath = '/Users/ahsan/Library/Application Support/Skype/ahsanyousuf/main.db'; | |
$db = new PDO( 'sqlite:' . $dbPath ); | |
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); | |
$query = 'SELECT id, author, dialog_partner, body_xml, timestamp, datetime( timestamp, \'unixepoch\', \'localtime\') as actualTime | |
FROM Messages | |
ORDER BY timestamp DESC | |
LIMIT 100'; | |
$history = $db->query( $query, PDO::FETCH_ASSOC ); | |
foreach( $history as $row ) { | |
print_r( $row ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment