"Backdoor to remotely hosted sqlite databases"
Notice: this is not a perfect solution, not at all. This is some kind of quick, weird workaround.
REQUIREMENTS:
Your remote server must support sqlite3
HOW TO USE:
- Copy contents of folder named "server" to remote host
- Copy your sqlite database to the same folder.
- In your script include client/assqlite.class.php
Full functionality was presented on index.php
Init:
require_once('client/assqlite.class.php');
$db = new assqlite("http://example.com/path_to_folder", "example.db");
Methods:
assqlite::busyTimeout(int $ms);
Set busy timeout duration, or disable busy handlers
$db->busyTimeout(1234);
assqlite::exec(string $query);
Executes a result-less query against a given database
$db->exec(" DELETE FROM `users` WHERE id > 100 ");
assqlite::query(string $query);
Executes an SQL query
$results = $db->query("SELECT * FROM `users` LIMIT 13");
assqliteResult::num_rows();
Returns number of rows;
$rows = $results->num_rows();
assqliteResult::fetchObject();
Returns result row as object
while($row = $results->fetchObject()){
print_r($row->{'id'});
}
assqliteResult::fetchArray();
Returns result row as array
while($row = $results->fetchArray()){
print_r($row['id']);
}
assqliteResult::data_seek(int $offset);
Move result array to declared point
$results->data_seek(10);