PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 12th, 1999, 12:05 PM
stefanbecker
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi,

how do i get some information about my visitors?
Things like IP, Operating System,used browser, referrer url and so....

Thx

Reply With Quote
  #2  
Old September 13th, 1999, 05:11 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Your webserver's log is going to have the majority of that information.

If you want that info to use in a PHP script, fire up a page containing the command php_info();

On that page you will find all values that PHP knows and the respective variable name for use in your script.

Reply With Quote
  #3  
Old September 15th, 1999, 01:10 PM
donarb
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Depends on when you need that information. Like the previous poster mentioned, you can get it out of the web server log.

If you need it in real time, for your CGI, there are environment variables that the server provides, things like $HTTP_USER_AGENT (browser) and $REMOTE_ADDR (IP address). PHP automatically provides these to you, you merely need to reference them.

You can get a list of the standard environment variables for CGI use at http://hoohoo.ncsa.uiuc.edu/cgi/env.html

[This message has been edited by donarb (edited 09-15-99).]

Reply With Quote
  #4  
Old September 22nd, 1999, 07:53 AM
timbo
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I'm doing it at the moment heres the script

<?
$timestamp=date("d-m-Y");
$timestamp2=time();
$file="/whatever/your/directory/structure/is/files/".$timestamp.".txt";
$fp=fopen($file,'a');
if (!$UserID)
{
$UserID=" ";
}
if (!$frame)
{
$frame=" ";
}
fputs($fp,"$REMOTE_ADDR,$timestamp2,$UserID,$frame,$REQUEST_URIn");

?>

this will log your users into a file dated for each days access. You cans then cat them to sort it and merge them

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Get user information

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap