PDA

View Full Version : Javascript Tracker



sartajc
10-27-2006, 04:48 AM
I am gonna let people use a script of mine but I want to know what websites are using it. Is there an javascript when put on a site it will send a message back with the URL of the site using it? Or it send information back to some PHP, Javascript, or whatever file that will make a list of all the URL's that the tracker Javascript is installed on?

tech_support
10-27-2006, 08:24 AM
Using PHP, not JavaScript.

djr33
10-27-2006, 08:36 AM
Nope. Not at all.

Not even PHP.

You could, theoretically, use PHP to send an email to you every time the script is run. You could also try some strange coding with javascript, perhaps with ajax, but that seems unlikely to work.

However, there is a big problem. If you give someone a script, they could just remove the code.

I'm not sure on your intentions for tracking your script, but if it's to prevent misuse, then they can just get around it by removing the code that sends you a message. If you're just curious, then perhaps doing that in PHP would work... but it's complex, and would be a pain to deal with. For one, each time the script was run, it would email. Things like that.

Also, if you're just curious, then you might want to just put "please tell me if you're using this on your site" on the download page.

The only other answer I can think of is to use google to search for something specific to your script. Since, however, it is javascript, google won't cache that. I mention it on the offchance that there is some unique content in it (html) that you could search for.

tech_support
10-30-2006, 06:08 AM
You could make it so it writes a log file onto your FTP, and updating it every time the user uses your scripts. But as djr33 said, it's going to be a lot of work.

sartajc
11-24-2006, 05:26 AM
You could make it so it writes a log file onto your FTP, and updating it every time the user uses your scripts. But as djr33 said, it's going to be a lot of work.
But is it possible?

Im doing it for a charity script and i want to know who runs the script. PHP, Javascript, w/e works.

codeexploiter
11-24-2006, 06:07 AM
I too think using Ajax you can accomplish that but in your server there should be something which will be running that listens connections from the HTTP requests initiated by the Ajax script and can maintain some kind of logs based on the request.

sartajc
11-26-2006, 01:53 AM
I too think using Ajax you can accomplish that but in your server there should be something which will be running that listens connections from the HTTP requests initiated by the Ajax script and can maintain some kind of logs based on the request.
How can you do that? any script you know of?