Coder Social home page Coder Social logo

frzte / opensource.guide Goto Github PK

View Code? Open in Web Editor NEW

This project forked from github/opensource.guide

0.0 0.0 0.0 14.56 MB

๐Ÿ“š Community guides for open source creators

Home Page: https://opensource.guide/

License: Creative Commons Attribution 4.0 International

Shell 1.44% JavaScript 22.00% Ruby 5.52% HTML 53.17% SCSS 17.88%

opensource.guide's Introduction

#!/usr/bin/perl

use strict; use warnings;

use lib 'Geo-IPinfo/lib';

use Geo::IPinfo;

my $token = '1234567';

if you have a valid token, use it

my $ipinfo = Geo::IPinfo->new($token);

or, if you don't have a token, use this:

my $ipinfo = Geo::IPinfo->new();

return a hash reference containing all IP related information

my $data = $ipinfo->info('8.8.8.8');

if (defined $data) # valid data returned { print "Information about IP 8.8.8.8:\n"; for my $key (sort keys %{$data} ) { printf "%10s : %s\n", $key, $data->{$key}; } print "\n" } else # invalid data obtained, show error message { print $ipinfo->error_msg . "\n"; }

retrieve only city information of the IP address

my $city = $ipinfo->field('8.8.8.8', 'city');

print "The city of 8.8.8.8 is $city\n";

opensource.guide's People

Contributors

agustingrigoriu avatar bkeepers avatar christolis avatar ciminbinazadeh avatar consugus avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar gab0gomes avatar katrinleinweber avatar kaynenstrife avatar kenyonj avatar krlsdu avatar lex111 avatar mbiesiad avatar mikemcquaid avatar minwook-shin avatar mlinksva avatar nayafia avatar nholden avatar nicorios avatar o-leolleo avatar patoi avatar reverince avatar silvercover avatar silviubogan avatar smashwilson avatar typingmonk avatar umutphp avatar yuichielectric avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.