ipgeolocation / ip-geolocation-api-php Goto Github PK
View Code? Open in Web Editor NEWIP Geolocation API PHP SDK
Home Page: https://ipgeolocation.io/documentation/ip-geolocation-api-php-sdk-201809051255
License: Apache License 2.0
IP Geolocation API PHP SDK
Home Page: https://ipgeolocation.io/documentation/ip-geolocation-api-php-sdk-201809051255
License: Apache License 2.0
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.
curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, false);
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.