the predefined variable $SERVER['HTTP_REFERER'] will show the referring url (if any, and if the user's browser sends it on). you can parse that out to get the domain and log the entire url. the variable $SERVER['HTTP_USER_AGENT'] will contain the user agent of the person like what browser opera, ie, netscape. some spiders will identify themselves thru this variable, i.e. Googlebot, Inktomi Slurp, Alexa (IA Archiver), WISENutbot (Looksmart) just to name a few.