?
Solved

get info for visitors

Posted on 2012-03-26
8
Medium Priority
?
306 Views
Last Modified: 2012-04-24
Dear,
When u go to sites like http://www.hide-my-ip.com/, the site shows your IP, Location  and ISP provider.
How can I do that in asp.net/php, and what other information of visitors can I get too?
Thx
0
Comment
Question by:hassanayoub85
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 1

Expert Comment

by:DrMadAxe
ID: 37769766
That is a GET function I believe.

Here is a good article:

http://wiki.jumba.com.au/wiki/PHP_Get_user_IP_Address

Also you will need to echo the variable once set up and use print to display it on the screen.

Hope that helps.
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 1000 total points
ID: 37769767
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 37770031
you need to either Sotre Cisty/State data broken down by IP into your Database...or you can use API's to get City State Data based upon IP..

I used following Service to get User Data:
http://www.maxmind.com/app/geolitecity
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37771722
Run this script and look near the bottom.  You can get the client browser and IP address.
<?php phpinfo();

Open in new window

Once you have the IP address, you can make an educated guess about the location.  See this article for more: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_3437-IP-Address-to-Country-in-PHP.html

You can get a more refined view of the client location by using one of the web services like this one: http://www.geoio.com/

I used the GEOIO service to get the IP-to-location information used to draw the map on this page.  
http://www.landonbaseball.com/site_visitors.php
Something interesting to note... The locations are not precise and though the site has had thousands of visitors, only a few hundred locations are mapped.  That is because the IP address is mapped to the location of the Internet Point of Presence.  Where I live in McLean, VA, there are thousands of people whose IP addresses all point to the same internet terminus.

HTH, ~Ray
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37804341
get the user's IP address in PHP:
echo $_SERVER['REMOTE_ADDR'];

Open in new window

location services... I already posted about that here:
http://www.experts-exchange.com/Networking/Protocols/Transport/TCP-IP/Q_27657512.html
0
 

Author Comment

by:hassanayoub85
ID: 37843775
Ok for country, what about other information of visitors can I get too?
I see that I can get the user-agent info, possible nat ip, hostname, request, referrer, and browser language used.
Any other info can I grab?
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37843826
If you join an advertising network like DoubleClick or UnderTone you will find all kinds of good information at very low cost.
0
 

Author Comment

by:hassanayoub85
ID: 37843849
Sorry but what is that? didn't understood!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question