I needed to quickly authenticate some phpBB3 users in a Flex application, and figured that it’d be no problem. Boy, was I wrong. phpBB does some neat dynamic password hashing trick that, to someone with no php experience like myself, looked to be too complex to emulate in CF.

After some searching, I found this post with tips on how to do it with CFEXECUTE. Unfortunately, I couldn’t quite get that to work, but I ended up rolling my own, with the help of some guys in #flex.

Download the sample code here.

remote_login.php and assoc_array2xml.php go in the root of your phpbb3 install.

Hope this saves a bunch of people a lot of time.

Help make me popular:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis

This entry was posted on Friday, February 29th, 2008 at 12:00 am and is filed under Development. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

9 Responses to “phpBB3 user authentication with ColdFusion”

  1. Matt on March 8th, 2008 at 12:00 am

    Okay I’m a neub, and just looking at this. I use phpBB3 but want the rest of my site CF. What file name did you give the code going into the phpBB root or was it placed in a file?

  2. Panther893 on March 10th, 2008 at 12:00 am

    ok that works, but how do you then do you add new users to the phpbb system with coldfusion??? i tried using the user_add() function with no luck…

  3. Shan on March 13th, 2008 at 12:00 am

    @Matt: It doesn’t matter what you name the PHP file, just make sure it’s in the root of your phpBB3 directory.

  4. Shan on March 13th, 2008 at 12:00 am

    @Panther893: I didn’t try to add users via ColdFusion… Part of the purpose of doing the authentication against phpBB3 was so I didn’t have to create a user signup or admin.

  5. Alec on October 4th, 2008 at 2:22 am

    Thanks for posting this. It probably saved me a great deal of time.

  6. ralphieq on October 4th, 2008 at 11:46 pm

    Just wanted to say thanks for sharing as well :)

  7. HSCharles on November 15th, 2008 at 7:13 pm

    I have a flash site
    i’m looking for the script who shows google adsense on flash.
    do you know this script?

  8. Andrew on September 8th, 2009 at 10:41 am

    Trying to use the script to login from CF to a phpBB3 site using their login procedure. I am getting this error shown here..

    http://s3.amazonaws.com/basec/678273/3630316/image001.png?AWSAccessKeyId=1RF809NDDCNB7616HJ02&Expires=1252428300&Signature=3bw9VXVNPk2vUgvv09LDcH4FARE%3D

  9. Mike on January 17th, 2010 at 4:31 pm

    Hi -

    I’m receiving the following CF error. Any insights? Thanks in advance and for posting this code!

    Cheers,
    Mike

    An error occured while Parsing an XML document.
    The element type “META” must be terminated by the matching end-tag “”.

    The error occurred in E:\W3\nicethings\test.cfm: line 9

    7 :
    8 : temp = ReplaceNoCase(CFHTTP.FileContent,”",”");
    9 : myXML = XMLParse(temp);
    10 :

Leave a Reply