Wez Furlong, a proponent of the OpenID authentication system, has posted a new tutorial of sorts that details a script for communication between your application and the OpenID servers.

I have a patch (php-openid.diff, for PHP 5, might also apply to PHP 4) for the openssl extension that makes it easier to build OpenID and TypeKey authentication support into your PHP apps. I don't have a canned solution for you to deploy, but I can give you some pointers on how to use these bits. I'm assuming that you know a bit about how OpenID works.

It's broken up into three sections - a look at associating with an OpenID server, performing the actual authentication (including the code for the page they're redirected back to), and an example of using the same functionality to interface with TypeKey.