Jump to content
xisto Community
tapan

Php Spy Code Spy on your site

Recommended Posts

Code Spy Code

Description Anyone who comes to ur forum's IP Adress, Site they came From, Their Browser and the time they came will get saved in a place that only the admin knows the location of...

V.2 More features coming up in V.2!!! POst suggestions/problems...

Preview:-

http://z15.invisionfree.com/Spy/index.php?

REFRESH THE PAGE, AND GO HERE:-

http://forums.xisto.com/no_longer_exists/

^^^^^^^That shows all the IP's, Browsers, Time, site and stuff....^^^^^^^^

 

Code

First of all, you'll need to host the files....

I suggest you make an account in http://www.seektoexplore.com/?dn=ripway.com&pid=7POF8BU45&_glst=2 or other host that allows php.....

 

Now make a new text file in ripway.

Name it spy.php and put this in it:-

 

<html>

<head>

<title>Spy on yor site code by tapan21 of http://forums.xisto.com/no_longer_exists/ </title>

</head>

<table border="5" bg color="white">

<tr>

<td><center>

<body>

<?php

 

//--------------------------------

// Spy on your website! Logs in time, ip, the site you came from and browser!

// Created by: Tapan21 of http://forums.xisto.com/no_longer_exists/

//--------------------------------

 

$spy = fopen("spy.html" , "a");

$site = $HTTP_REFERER;

$ip = $REMOTE_ADDR;

$browser = $HTTP_USER_AGENT;

$time = date("H:i dS F");

 

echo "The site you came from: " . $_SERVER["HTTP_REFERER"] . "<br />";

echo "ALL IP ADRESSES, TIME, SITE AND YOUR BROWSERS ARE BEING CAPTURED!";

 

fwrite($spy,"<<<<<------------BEGIN------------>>>>><br />");

fwrite($spy,"Site you came from: $site <br />");

fwrite($spy,"IP Address: $ip <br />");

fwrite($spy,"Browser: $browser <br />");

fwrite($spy,"Time: $time <br />");

fwrite($spy,"<<<<<------------END------------>>>>><br />");

 

fclose($spy);

?>

 

</table>

</center></td>

</tr>

</table border>

</body>

</html>

 


Save it...

 

Now make a new text file and name it spy.html

Add this in it:-

 

<html>

<head>

<title>Spy on your site! Code by Tapan21 of http://forums.xisto.com/no_longer_exists/

<head>

<body>

 


Save it...

 

Now go to ur site/forum and put this code in the "<body>"tags...

 

<script src='LINK TO SPY.PHP FILE!'></script>

 


And you're done!!!

:huh:

 

How it works Every time some one goes to your site/forum index page (i think) their info will be saved in your spy.htmlfile! Dont ever forget the url to the spy.html file!

 

Code From:Arcade Highscore

 

So all you have to do is go to the spy.html file to see all the info.....

You can even edit the spy.html file if its over full!

It''s very easy to use!

 

PLease post any questions, complaints or suggestions for my next version!

 

Enjoy!!

;)

Edited by tapan (see edit history)

Share this post


Link to post
Share on other sites

Nope There's no downside.Also, V.2 is done and released!I dont have time to post it here, but I'll do so when I have time.If you want it anyways, then you can get it from my forums...Glad everyone likes this code.It was specifically made for Invision Boards. :)

Share this post


Link to post
Share on other sites

Great idea man, it looks like this would pwn for the more active forum boards like Xisto itself. But they probably are using somehting like this already, but great for the community. thumbs up x2! :)

Edited by savge17 (see edit history)

Share this post


Link to post
Share on other sites

That's not too bad, but one drawback: If you get many of the same visitors (especially if they're on DSL or some other some other always-on connection), then your file will be cluttered constantly with their information (which would either be exactly the same, or very similar), and it would be hard to find new ones. If possible, it would be easier if you could use MySQL with that to check for whether that particular IP has been logged. If you want it that way, then ignore this.

Share this post


Link to post
Share on other sites

There is a way to make it so that it only logs in one file per IP...I just dont know how.Any anyways, I wont be coding until I'm fully back on track with my new Site+Forum(lost my old one...)

Share this post


Link to post
Share on other sites

Thats a great code to offer, it provides security for your forums and is really neat. You made the tutorial nice and easy to read and understand so it shouldn't be a problem to add it. I may have a try at it tonight if I get time.

Share this post


Link to post
Share on other sites

Code Spy Code

Description Anyone who comes to ur forum's IP Adress, Site they came From, Their Browser and the time they came will get saved in a place that only the admin knows the location of...

 

 

That was a pretty good tut. Thanks

 

Will we get only the details :IP's, Browsers, Time, site

Cant we get the OS name which the user is using?

Share this post


Link to post
Share on other sites

Honestly, i think logging that info everytime someone visits your forum is kinda overkill. Especially over the course of a few years you'll have tens of thousands, if not more, duplicate entries.I have my forum (phpBB2) configured to log all that information--but only when people first register. Seems be a saner way to do it, IMHO.

Share this post


Link to post
Share on other sites

Also, the Hosting account here at the trap gets everything logged in the Web Stats that you need anyway. The Web Stats will tell you the info you need to know about the Operating Systems that are visiting, the pages which are visited, where the visiturs are from and lost more information. (How many 404 errors you pull...) (How many times the Bots visit, and which ones) (How much Bandwidth and storage you use per month)Check it out via the Cpanel.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.