Yes. If the script that makes the button on their page is hosted on your server, it may have a .php extension. It therefore would have access to the database or file or whatever you have the stats stored in on your server.
You might not be familiar with this technique. In it's most basic form you have a PHP file, call it script.php. You give it an application/javascript header and then put your javascript code in there. Only you can also add PHP tokens and code to fetch data from the server. It still can be put on the client's page as:
Code:
<script type="text/javascript" src="http://www.yourdomain.com/script.php?url=thispage"></script>
But it would be better to have an ordinary script that creates that script:
Code:
document.write('<script type="text/javascript" src="http://www.yourdomain.com/script.php?url=' + encodeURIComponent(window.location.href) + '"><\/script>');
also hosted on your server. Let's call this one first.js. So you give them a tag to use like so:
Code:
<script type="text/javascript" src="http://www.yourdomain.com/first.js"></script>
It writes the tag on their page, sending script.php on your server the URL of the page, which it then looks up in the data file and creates the button on their page.
Bookmarks