Hi,
Yeah you sure can use the finger command, When using with php it is known as a shell command which must be used with the exec() or system() functions and the command used would be:
whois root@system.domain or
whois user@maildomain.com
But many ISP's consider this a security risk as this could return information about their su's.
It really depends on your host and whether they'll let to execute system commands.
Also try and look for an alternative @ www.hotscripts.com.
Hope this helps,
Elfyn