djanim8 Posted November 29, 2007 Share Posted November 29, 2007 Is there anyway to get the user's domain they are looking at a website FROM I.E. I'm on the road runner domain.. is it possible to get my domain when I view a website I've developed? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 29, 2007 Share Posted November 29, 2007 geoIP is an amazing package if you got money, otherwise get the remote ip from the $_SERVER variables (look it up on php.net) and then find a way using sam spade to reverse it to a domain Quote Link to comment Share on other sites More sharing options...
djanim8 Posted November 29, 2007 Author Share Posted November 29, 2007 ok I can get the IP address, I'm doing that now, should I search for "sam spade" to reverse it to the domain? I'm unsure what that is... Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 29, 2007 Share Posted November 29, 2007 samspade is just one of many free web tools that allow reverse DDNS look ups for free, geoIP is a package that does a process in php, but a subscription fee applies. You will need to do a file_Get_contents of the samespade result or some other Reverese ddns Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted November 29, 2007 Share Posted November 29, 2007 Here's what I use (it works most of the time): <?php if ($_SERVER["HTTP_X_FORWARDED_FOR"] != ""){ $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; $proxy = $_SERVER["REMOTE_ADDR"]; $host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]); }else{ $IP = $_SERVER["REMOTE_ADDR"]; $host = @gethostbyaddr($_SERVER["REMOTE_ADDR"]); } echo "Remote host is $host<br>"; ?> Ken Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 29, 2007 Share Posted November 29, 2007 however, that will only work if its given, which odds are if ip is given then that will all be given, but samspade never fails if you got an IP Quote Link to comment Share on other sites More sharing options...
djanim8 Posted December 2, 2007 Author Share Posted December 2, 2007 ok I've checked out samspade.org and I get tons of info when I actually type in an IP.. but when I put a link in the code to try to strip apart the code and get the domain, it says this: That information isn't in the cache For example, tried getting it with this: http://samspade.org/whois/74.6.25.34 is there another link that would display in the data so I can read it? like http://samspade.org/whois/?ip= or something? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.