Well you can use phplib, it has some session functionality and it works with php3. Another option is to create your own session handling functions, it's not all that hard, all you have to do is use a little md5(), sendcookie() (or put the session id on the commandline instead if you wish) , serialize() & unserialize(), and some minor file saving opening functions and yer there. 🙂
I'd toss up some sample code but I'm betting it would be quite redundant, you're probably best to look in on phplib, it's a tried and true was of doing this stuff on php3.