Based on Reverse DNS lookup in perl i tried to create a variable in NGINX so I can use in order to identify search engines but I got alot of errors like this:
2016/06/16 21:10:33 [error] 25853#0: *519 call_sv("sub { return scalar gethostbyaddr(inet_aton($remote_addr), AF_INET); }") failed: "Undefined subroutine &main::inet_aton called at (eval 3) line 1."
Added into my http block:
perl_require Socket.pm;
perl_set $test_rdns "sub { return scalar gethostbyaddr(inet_aton($remote_addr), AF_INET); }";
Please help, I can't find the key of solving this matter.