After upload, this code gets the error on ip2proxy not found on the server. I have already installed ip2proxy extension.
use IlluminateHttpRequest;
use IlluminateRoutingController as BaseController;
use IP2ProxyLaravel;
class Controller extends BaseController
{
public function lookup(Request $request)
{
$get_ip = "89.39.104.204";
$records = IP2ProxyLaravel::get($get_ip, 'bin');
if ($records['isProxy']) {
return view('proxy');
} else {
return view('non-proxy');
}
}
}
2
Answers
I'm using
alternate of ip2proxy
First of all, did you run the command
composer require ip2location/ip2proxy-laravel
in your laravel main folder?You should be able to see this line
"ip2location/ip2proxy-laravel": "^1.1",
in your laravel/composer.json after you run the command above.Then, you may follow the steps in https://github.com/ip2location/ip2proxy-laravel#usage for the IP2Proxy laravel extension usage.