如何计算来自另一个网站(完全不同的域)的一个网站的访问者

I want to count the visitor of a website(which is located totally different domain) from my website.Just like Alexa is counting the visitor of all website . How it can be done? Any idea or implementation please. Thanks in advance.

For all i clarify my question.

Suppose I want to count the visitor of www.yahoo.com. The total number of visitor, per day or per month etc. I know this will be very easy if i am the owner of www.yahoo.com, but if i have no connection with www.yahoo.com, then is it possible to know their visitor or any statistics?

Alexa uses statistics from it's toolbar to estimate the number of visits on a website. I would suggest using an API such as the Alexa API in order to find out this information as opposed to gathering it yourself.

You can count them on the client side using document.referrer and then if the prior domain matches your objective increment a number stored in localStorage and beacon this number back to the mothership with AJAX.

if you want to make stat to your own visitors I use Some thing like This

Using javascript code like google

when you register in google analytic you will have javascript code to add in your website this code will connect to google in any visit to site

or using 1 pixel image this image hosted on your website

this image insert data to your visitor database Using Code Of Site

Like

if i have client and i want to collect information about his visitors

i will add client to my clients in database

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ id  + client_key   + client_name + client_email + client_website + STATUS      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1   +  any key     +  Test       +  Test@domain +  http://www... + 1           +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

and use his primary key as forign key in

visits table which contain

+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ id + client_id + time + ip + referrer  + systeminfo +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

and get image like

<img src='http://mywebsite.com/stat.php?cid=client+key' alt='' />