In PHP5 there is also the sqlite_fetch_column_types() function that can be used to determine column types inside a table.

<?php
$db 
= new sqlite_db(dirname(__FILE__)."/ip.db");
$r $db->fetch_column_types("ip_ranges");

echo 
'<pre>' print_r($rtrue) . '</pre>';
?>
Output