Using the SPiD API: Working examples for PHP