I’m building an IP address finder in WordPress with the help of Formidable Forms. I’ve created a functioning search page, but the IP range stored are all decimal intergets. The user input is always a dotted decimal (an IP address). So how do I convert the IP address to an integer when the user requests a search?
When the user searches, the website will take them to [siteurl]/search/?ip=[20 sanitize_url=1], [20 sanitize_url=1] is the IP address the user input.
The website then will display matching items under the filter start_of_ip_range <= ip (long) <= end_of_ip_range.
I’ve added a shortcode “ip2long” and “long2ip” with Shortcodes Blocks Creator Ultimate, and it works with pages, post, and even Formidable Forms Views, but seemingly not with Formidable filters.
However, when I tried to use [ip2long]ip[/ip2long], nothing shows up, which probably means that Formidable Forms doesn’t allow you to use 3rd-party shortcodes in filters.
One workaround I can think of is to use a medium url that converts the ip to a long integer, but I’m afraid it’ll be extremely slow.
Any idea how i can use the shortcode? Or do you have other ideas (even with another plugin so long as it can finish the request.)