Skip to content
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

ipstack return server IP #278

Closed
Wooody82 opened this issue Dec 17, 2018 · 1 comment
Closed

ipstack return server IP #278

Wooody82 opened this issue Dec 17, 2018 · 1 comment

Comments

@Wooody82
Copy link

Hi,
I am trying to get the user ip by using PHP function to return the IP, But its return the website Server IP.. What is the problem?

$ch = curl_init('http://api.ipstack.com/check?access_key=API-KEY');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);
$api_result = json_decode($json, true);
 return $api_result['ip'];

Thanks

@fiorix
Copy link
Owner

fiorix commented Dec 19, 2018

See #268

@fiorix fiorix closed this as completed Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants