|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
using tracert to get hostname in php script
I k now normally you'd use gethostbyaddr(); , but the situation I'm working in will have 90% of the users coming from an outside address from behind a router on various networks, all using 192.86.... addresses. I Need to be able to grab the top level domain for these users for security reasons, to restrict access to persons not coming from the correct locations; this in addition to a login system..
So is there some way to use tracert from php (maybe with exec() ?) and grab an array of returned hops, from which I can get the data? or is there some other method? because obviously when you try to tracert, nslookup, gethostbyaddr, whatever... to a 192... address, you can't get anything from it... is there some way around this? using sockets maybe? blah i'm confusing myself |
|
#2
|
|||
|
|||
|
Baiscally you want to get there localhost address?
|
|
#3
|
|||
|
|||
|
Hey, do anyone how to get user location using php by converting and calculating the ip.
|
|
#4
|
|||
|
|||
|
hm well here's a better description of my problem
I wrote the question poorly yesterday, here goes:
We have users from different physical TLDs who will need page access. My boss wants to only allow users from .mil, .gov, and -qwest(some node) to even get to the page, before logging in. The problem is , the .gov and .mil users are on different subnets and will all have 192... addresses. Is there any way to get the router address from which they're coming at you? NAT is running, but you still get the 192... host ip in php. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > using tracert to get hostname in php script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|