one thing you'll need to do is change the name of the file in the form action event from check_cookie to ubb_cookie (i forgot to change it).
Other than that the comments in the file show you the only other thing you need to change (the path to your cgi-bin in the first global var). You will need to be running PHP on your web server in order for this to work.
To integrate it with another page you only need to include it, possibly like this
[code][/code](take the _ out of the script tags to use, I had to put them there so UBB would let me post the code)
You would need to change the page in the form action to the page you include it on. The next version I write will eliminate having to do that.
I haven't tested this integrated in another page, but it should work.
Hope that helped. If you're not a coder there are several web resources that will help you with what I just said.