As with any database system the first thing you must do is open a database. Since SQLite is based on files opening a database differs very little from opening a regular file.

<?php
$db 
sqlite_open("./ip.db"0666$error
    or die(
"Failed to connect because: ".$error);
?>
Notes