User Login Monitor Script

I need some help writing a script that I can run as a cron job. I want this script to be able find all the users that have logged on to this machine since the last time the script was run (plan to run daily at 11:30pm, so everyone who logged on that day) and email me who logged on, and when.

My main issue is that I do not know where of if linux/unix servers store this time of information that I can parse out. I have preference as to scripting language, ksh, perl, c, just as long as it works. If it helps, I'm trying to run it on Solaris 9 and above, but would like it to run on linux machines like SUSE 9.2 as well.

'man last' [on Solaris] gives this:

This is something to start with - maybe Googlin' would help as well.

thanks, that is exactly what I needed.