Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,265 members, 7,957,652 topics. Date: Tuesday, 24 September 2024 at 04:51 PM |
Nairaland Forum / Science/Technology / Programming / This Php Server Remote Addr Is Giving Me Different Device Ip Address (1155 Views)
Help With This Php Problem / Please Help Me In This PHP Pagination Code / If You Can Modify This Php Source Code Drop Your Contact (2) (3) (4)
This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:59pm On Aug 23, 2021 |
Any solution for my pitfall I tried getting my ip address using server global function remote addr but this is wat i getting. Different ip that is not the same with my phone ip. Photo below This is my website to see the error Advisedlyremove
|
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 11:16pm On Aug 23, 2021 |
Are you using wifi to connect to the website? |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 11:17pm On Aug 23, 2021 |
webapi:noooo my data |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by Codedboy95(m): 1:06am On Aug 24, 2021 |
dodgelord: What remote addr shows is your public addresss which is provided by your Mobile operators/ISPs. There is no way to get your phone private ip address in php, head over to whatismyipaddress. com you will see that it grabs same IP address as your php code. |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 2:19am On Aug 24, 2021 |
Codedboy95: i try to using my mom phone to access my site to see if i will get a diff ip,,,,, but they re the same. |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 9:44am On Aug 24, 2021 |
dodgelord: Which network are you using? 1 Like |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:34am On Aug 24, 2021 |
webapi:glo |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 10:39am On Aug 24, 2021 |
dodgelord:Visit this website to see your ip address and compare with what you are getting in php https://whatismyipaddress.com/ 1 Like 1 Share |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:40am On Aug 24, 2021 |
webapi:see wat am getting
|
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:42am On Aug 24, 2021 |
webapi: Here's wat am trying to pass to u. I used 3 phones to access my site to see if it will give a different IP. But, still getting the ip number no changes |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 11:48am On Aug 24, 2021 |
dodgelord:Ofcourse it will give you same ip because the ip address php is getting is from your ISP and the location. Php cannot have access to your device details. Only if you are building a mobile app you can have such access. That is why websites uses ip address to block visitors based on location. You cannot block a visitor based on his/her device. So yes your php code is doing the right thing. Hope this helps |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 11:57am On Aug 24, 2021 |
webapi: Nice..... Which one is nairaland using to get guest online? |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 1:42pm On Aug 24, 2021 |
dodgelord:Well i can't tell what nairaland is using but i get mine using socket io. If you are familiar with that, you should be able to get realtime visitors count. Also do not store these info in your database. You don't want to overload your database with a temporary counter. Hope this helps |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:18pm On Aug 24, 2021 |
webapi:where should i store it |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 12:26am On Aug 25, 2021 |
dodgelord:Don't store it anywhere if what you are looking for is visitors counts. Just display the counter on your frontend. Hope this helps |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by dodgelord: 10:16am On Aug 25, 2021 |
webapi: when the visitor leaves the site it will delete from the db |
Re: This Php Server Remote Addr Is Giving Me Different Device Ip Address by webapi: 10:22am On Aug 25, 2021 |
dodgelord:If you can do it that way that's fine 1 Like |
(1) (Reply)
Please Recommend A Good And Comfortable Work Chair / I Need Help With My Ajaxcontroltoolkit / Android Webview
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21 |