-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: New Map feature to be added #30
Comments
Hey @viion , really glad you like the new feature! From my side, I don't see much value of putting this into the PHP SDK (or any SDK). The output is only going to be some JSON with a link like this:
If the intention is to input IPs to an SDK function and then use that link to be displayed somewhere in your app, then that would make sense. But I can't see any other use case. What do you think? @coderholic any idea if this is worth putting into SDKs? |
I wonder if it would just be for convenience, I guess it would need to align with the goals of this functionality. An example use case I have: At my company we monitor AWS ALB logs, and we have reports generated daily about where traffic came from and this uses ipinfo php library to get region/city etc, and we build dashboards on that. With the introduction of maps I have now added this to our report generation script: $ipfilename = self::SAVE_PATH .'/ip_list';
file_put_contents($ipfilename, implode("\n", $ips));
// generate map from ipinfo
$response = shell_exec('cat '. $ipfilename .' | curl -XPOST --data-binary @- "ipinfo.io/map?cli=1"');
$response = json_decode(trim($response), true);
$entity->setMapLink($response['reportUrl']); So I'm basically just doing a Just thought i'd bring up to discuss, as ipinfo is so simple and convenient to use anyway! |
I love that use case, thanks for sharing! Will get back to you fairly soon about this; hoping we can add it :) |
Alright got the 👍 to implement this; will do it soon. |
Available in v2.2.0. Example from test cases: $h = new IPinfo();
$url = $h->getMapUrl(file("tests/map-ips.txt"));
echo "got URL ".$url; |
Hello!
I really love IP info and recently you guys launched: Map IPs: https://ipinfo.io/map
Would it be possible to get this in the library? I was thinking of PRing it but unsure if it's more of an "experimental/fun" thing at the moment or if it's something that will stick around and is production ready.
Kind Regards!
The text was updated successfully, but these errors were encountered: