Skip to content

Instantly share code, notes, and snippets.

@colus001
Created March 22, 2023 05:12
Show Gist options
  • Save colus001/8f6a6a7bbc36cbcb1366b4822729ad68 to your computer and use it in GitHub Desktop.
Save colus001/8f6a6a7bbc36cbcb1366b4822729ad68 to your computer and use it in GitHub Desktop.
Simple IP Check
  • JSON

    $ curl ifconfig.co/json
    

    Response

    {
      "ip": "123.123.123.123",
      "ip_decimal": 1234512345,
      "country": "South Korea",
      "country_iso": "KR",
      "country_eu": false,
      "region_name": "Seoul",
      "region_code": "44",
      "zip_code": "123",
      "city": "Nether-gu",
      "latitude": 22.5024,
      "longitude": 341.123,
      "time_zone": "Asia/Seoul",
      "asn": "AS9318",
      "asn_org": "Unknown Co Ltd",
      "user_agent": {
        "product": "curl",
        "version": "7.86.0",
        "raw_value": "curl/7.86.0"
      }
    }
    
  • IP ONLY

    $ curl ifconfig.co
    

    Response

    123.123.123.123
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment