Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

get info for visitors

Posted on 2012-03-26
8
Medium Priority
?
308 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

610 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