NYCPHP Meetup

NYPHP.org

[nycphp-talk] Hmm, how to count 'online' users?

Eddie Haber php at haberco.com
Thu Aug 12 14:59:17 EDT 2004


You can always attach a unique id to avoid caching:

'"<img 
src="http://www.spyware.com/trojan_images/listener.php?login=poor_sap@bigbro
ther.com&uniqueid='.md5(uniqid()).'" height="1" width="1">"'

Even better, You can email these gifs to people and track when they read
your emails. 

Yikes!
E

PS: I don't know if browsers cache to the left of the "?" only in the URL or
the whole URL, but you could either additionally:
    a) pass the id info to the script as additional path info (I think PHP
still supports this),
eg:../trojan_images/listener.php/poor_sap at bigbrother.com/SOME_UNIQUE_ID

    b) Or, use apache's mod rewrite:
    .../trojan_images/listener/poor_sap at bitbrother.com/SOME_UNIQUE_ID
    gets rewritten as:
.../trojan_images/listener.php?email=poor_sap at bigbrother.com&uniqueid=SOME_U
NIQUE_ID


On 8/12/04 2:19 PM, "Ajai Khattri" <ajai at bitblit.net> wrote:

> Steve Manes wrote:
> 
>> Another, somewhat wackier one is to embed a 1x1 on each page, its
>> argument being the user's authenticated login name.
> 
> 
> And if the image is cached by the browser?





More information about the talk mailing list