PHP Classes

SQLite3 checker: Checks if a file is of a SQLite3 database

Recommend this page to a friend!
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 105 This week: 1All time: 9,696 This week: 560Up
Version License PHP version Categories
sqlite3_checker 1.0BSD License5.4PHP 5, Databases, Files and Folders
Description 

Author

This class can checks if a file is of a SQLite3 database.

It traverses a given directory recursively to find SQLite3 files, excluding user's directories and files.

The class can check the data of a given file to find out if is it SQLite3 file or not.

Innovation Award
PHP Programming Innovation award nominee
January 2018
Number 8
This class can checks if a file is of a SQLite3 database.

It traverses a given directory recursively to find SQLite3 files, excluding user's directories and files.

The class can check the data of a given file to find out if is it SQLite3 file or not.

Manuel Lemos
Picture of Damir
  Performance   Level  
Name: Damir is available for providing paid consulting. Contact Damir .
Classes: 3 packages by
Country: Croatia Croatia
Age: 59
All time rank: 32877 in Croatia Croatia
Week rank: 106 Up1 in Croatia Croatia Up
Innovation award
Innovation award
Nominee: 2x

Documentation

SQLite3 checker

This is simple class that allows search for SQLite3 files somewhere in file system.

It happens, especially if software deals with beginers, that some created databases were dispersed over unknown destinations.

To make things more difficult, SQLite3 database could exists with various extensions, even without them. So, it is not posible to determine if something is SQLite3 file just on extension basis.

So, this class checks first 100 bytes of suspiction file and find out is it SQLite3 file.

Example 1:

This code:

$kk=new SQliteSearch("../../../",NULL,array("2"=> "repo"));

echo $kk."<br><br><br>";

foreach($kk as $k=>$v)
echo "<br>$k ".print_r($v)."<br><br>";

would make this result: <pre> Database1:../..\db\ELSE.db Database2:../..\db\MultiLang.db

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => -? ) ../..\db\ELSE.db 1

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../..\db\MultiLang.db3 1 </pre>

Example 2:

Almost same code:

$kk=new SQliteSearch("../../../");

echo $kk."<br><br><br>";

foreach($kk as $k=>$v)
echo "<br>$k ".print_r($v)."<br><br>";

would make this result: <pre> Database1:../../..\repo\db\ELSE.db Database2:../../..\repo\db\MultiLang.db Database3:../../..\ucenici\franezidic\Db\MultiLang.db

Database4:../../..\ucenici\jadrankotudovic\Db\MultiLang.db

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => -? ) ../../..\repo\db\ELSE.db 1

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\repo\db\MultiLang.db3 1

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\ucenici\franezidic\Db\MultiLang.db3 1

Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\ucenici\jadrankotudovic\Db\MultiLang.db3 1 </pre>


  Files folder image Files  
File Role Description
Accessible without login Plain text file readme.md Doc. Readme file
Plain text file SQLiteSearch.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 0%
Total:105
This week:1
All time:9,696
This week:560Up