Neil Turner's Blog

Blogging about technology and randomness since 2002

PHP TypeKey

This is something I’ve kept meaning to do but never got around to implementing – using PHP instead of JavaScript for managing TypeKey user information on the comments forms.
The current method is, to me, a bit of a hack. It involves calling a CGI script to read a cookie which checks to see if the user is signed in, and then some document.write() statements to vary the look of the comment form depending on whether the user is signed in to TypeKey or not. This can all be done using PHP.
Update: PHP-TypeKey is now located here.

16 Comments

  1. PHP TypeKey

    PHP TypeKey…

  2. Great work, I implemented it and the pages are loading super fast now compared to before. You may just want to change the script above, in dynamic templating mode, you can’t use <? you’ll need to use <?php
    Also this doesn’t seem to work properly in dynamic publishing mode because MTRemote tags are being taken literally, I’m trying to find a way to get this to work in dynamic templating system…

  3. This is only slightly related. I’m seeking some advice and i respect Neil enough to take his advice seriously.
    I do a fair amount of back-end website stuff for a contractor. All of the code i’ve done has been an asp.net / sql-server combo. But the guy i do the work for is actually pretty flexible as long as the site works. On an xp machine IIS is handicapped to such an extent that developing web applications on a single machine is painfully slow moving to say the least. On top of this i’m hoping to migrate to a powermac in the near future (or maybe march 2005 haha)
    I want to start developing with php+mysql instead, so that i’m not trapped in a microsoft jail cell.
    I’ve worked with a vast number of languages so it shouldn’t be a struggle, but the php documentation in the past has put me off learning enough to be considered a rapid developer, especially where database manipulation is concerned.
    So anyway, from what i gather you are an expert in these fields and a good judge of well written simplicity. Can you recommend a good site of textbook that covers php in an intelligent business oriented manor?
    (Sorry that that was so long winded, i wanted to explain my reasons first…come to think of it, maybe this would have been better in an email)

  4. Type Key Authentication on PHP

    Finally! There is a decent implementation for authentication using Type Key which you can download a copy of the Auth_Typekey which Daiji Hriata wrote. Looks way better than the PECL module called Auth_Typekey which I’ve been developing in my free…

  5. Neil, does this work with dynamic templates? What about the safeREF plugin?

  6. The SafeHREF plugin is not dynamic-compatible, as far as I know. As for the rest of the code, it should work if you replace <? with <?php .

  7. I think you can use encode_html=”1″ instead of SafeHREF plugin.

  8. No, you can’t – I tried 🙁 .

  9. Hmm… this is weird, I can’t get it to work for me. I will email you my template. Maybe you can see something I am missing.

  10. For the others having the problem I was using a free SSL domain through my host https://koldarknet.secure.powweb.com for all CGI, and I ended up having to use AdminCGI in `mt.cfg` for my admin interface, to get it to work properly with http://www.koldark.net. I am not sure if it is a bug with how Neil is handling things or if it is somewhere else. But I now have it working.

  11. I figured out your validation issue, and it should work with dynamic templates (untested).

  12. htmlentities is a PHP function that encodes the URL. I use this other places. I have verified that it works on my site.

  13. links for 2004-12-01

    Neil’s World – PHP TypeKey How to make your Individual Archives use PHP for the TypeKey information instead of…

  14. links for 2004-12-03

    Busty Mousepads Mousepads for $25 with gel wrist rests. Shaped like boobs. Attached to a hentai girl. [via sexblo.gs] (categories: funny sex) To dance,…

  15. Dumping

    I didn’t buy the LCD television I wanted for Christmas because I kept reading that prices will decline after the…

  16. TypeKey con PHP

    Hace unos d