Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: php function allow us to know all informations about visitor (all)  (Read 499 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .

hello everybody, how you doing, Actually what i'am going to write is a little bit strange for you if you dont like ( to get informations from your visitors)..
i am thinking to creat a new function PHP page, which allows us to know all informations about the visitor including (ip,system that runs it; version of navigator he use, etc...).
so what do you thing is it possible or what i said is incompatible and Breaking the laws (spy). ;D ;D ;D?

mention: what prompted me to think in this function,  is some times i have to get some informations from the visitor in In the cadre of public security,
« Last Edit: October 11, 2011, 01:48:55 AM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
Re: php function allow us to know all informations about visitor (all)
« Reply #1 on: October 11, 2011, 05:39:49 PM »

hi adminphp

1) take a look at this code, will write the data to a file.

Code: [Select]
<?php

/*
Visitor Information Logger
Coded by Moonbat
http://www.all-nettools.com
http://www.cybernin.net
*/

// Assigning the IP Address, User Agent, and Referer to variables
$ipaddress $_SERVER['REMOTE_ADDR'];
$useragent $_SERVER['HTTP_USER_AGNET'];
$referer $_SERVER['HTTP_REFERER'];

// Opening up log.html
// The letter a is to signify that we just want only to 
// write data to the end of the file while we have it open 
$ourfile fopen("log.html""a");

// We will now write the data into the file
fwrite($ourfile$ipaddress);
fwrite($ourfile"<br>");
fwrite($ourfile$useragent);
fwrite($ourfile"<br>");
fwrite($ourfile$referer);
fwrite($ourfile"<br><br>");

// Closing connection with the file
fclose($ourfile);

?>




awsome evening to all  8)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: php function allow us to know all informations about visitor (all)
« Reply #2 on: October 12, 2011, 03:06:01 AM »

thanks mosh, i found the function which i searched it, with a complete php pages, i just have to upload them into my htdocs
Logged
“Fifty years of programming language research, and we end up with C++?”