Capture only the Visitor ID of a Current Visitor

OBJECTIVE ONE: Capture ONLY the visitor ID (alternatively IP address) of a visitor in the moment that he triggers an AJAX call.

Any suggestions about how to achieve this?

Roddy