Lines Matching refs:to
5 // Fetch ip-to-country.com data and index database
9 $ipdbt = "ip-to-country.db~";
10 $ipdbc = "ip-to-country.dbr~";
11 $ipdb = "$root/backend/ip-to-country.db";
12 $ipidx = "$root/backend/ip-to-country.idx";
18 // Get last modified date of ip-to-country data
22 // Fetch data from server to local temporary file
36 format, then we reject to replace the old file with this.
41 if (!$ipdbf) { die("Unable to open '$ipdbt' for reading"); }
45 if (!$ipdbcf) { die("Unable to open '$ipdbc' for writing"); }
48 // the file is expected to be ok
58 // switch to the 'data' state
60 if (trim($line) != "#Directi IP-to-Country Db: Start") {
68 // which case we write it out to the local rewritten
71 if (trim($line) == "#Directi IP-to-Country Db: End") {
95 // it to the destination, or else delete that too
107 // Create local index for ip-to-country.com data
120 if (!$ipdbf) { die("Unable to open '$ipdb' for reading"); }
128 // Unable to read a record and not at end => error
130 die("Incorrect ip-to-country database format");
140 // add a new element to the index array
150 // Write out index to file
152 if (!$ipidxf) { die("Unable to open '$ipidx' for writing"); }