File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,14 @@ public function index()
3232
3333 public function get ($ ip , $ db = '' )
3434 {
35- $ obj = new \IP2Proxy \Database ();
36-
3735 if ($ db == '' ) {
38- $ obj-> open (ROOT . DS . 'vendor ' . DS . 'ip2location ' . DS . 'ip2proxy-cakephp ' . DS . 'src ' . DS . 'Data ' . DS . 'IP2PROXY.BIN ' , \IP2Proxy \Database::FILE_IO );
36+ $ obj = new \ IP2Proxy \ Database (ROOT . DS . 'vendor ' . DS . 'ip2location ' . DS . 'ip2proxy-cakephp ' . DS . 'src ' . DS . 'Data ' . DS . 'IP2PROXY.BIN ' , \IP2Proxy \Database::FILE_IO );
3937 } else {
40- $ obj-> open ($ db , \IP2Proxy \Database::FILE_IO );
38+ $ obj= new \ IP2Proxy \ Database ($ db , \IP2Proxy \Database::FILE_IO );
4139 }
4240
4341 try {
44- $ records = $ obj ->getAll ($ ip );
42+ $ records = $ obj ->lookup ($ ip, \ IP2PROXY \Database:: ALL );
4543 } catch (Exception $ e ) {
4644 return null ;
4745 }
You can’t perform that action at this time.
0 commit comments