GithubHelp home page GithubHelp logo

ipgeolocation / ip-geolocation-api-php Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 20.0 24 KB

IP Geolocation API PHP SDK

Home Page: https://ipgeolocation.io/documentation/ip-geolocation-api-php-sdk-201809051255

License: Apache License 2.0

PHP 100.00%
ip-geolocation-api ip-location php timezone-api

ip-geolocation-api-php's People

Contributors

eff-kay avatar ejaz-ahmed avatar irtaza100 avatar ul-jf avatar usmanbinliaqat avatar zeeshan-tfw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ip-geolocation-api-php's Issues

ASCII Only filter, feature request

Just a feature request on an otherwise sold product. I have an app where we use ip-geolocation to strip in the city/country results to a table. The table must be in ASCII and we get the json results in UTF-8. Stripping every dialectic mark has proved to be burden on the client app (written in Qt but then localized for different deployments) so I was wondering is the reply Language request feature could be extended to support this use case.

Responses in Json and Curl cames differents?

I have the code

private function getLocation() : array{       
        
    $url = "https://api.ipgeolocation.io/ipgeo?apiKey=".env("IPGEOLOCATION_KEY");

    $cURL = curl_init();
    curl_setopt($cURL, CURLOPT_URL, $url);
    curl_setopt($cURL, CURLOPT_HTTPGET, true);
    curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Accept: application/json'
    ));
    $result =  curl_exec($cURL);
    curl_close($cURL);

    return  json_decode($result,1);
    
}

case i put directly on the navigator in get mode

https://api.ipgeolocation.io/ipgeo?apiKey=".env("IPGEOLOCATION_KEY")

it returns correctly the IP adress, but...

by CURL it returns always a São Paulo/Brasil IP.

Why?

How i fix it?

in time:

with $.json({}) also it return corectly.

But i woud like of use Curl

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.