Re: Writing my own web based user forum

From: Date: Fri, 01 Aug 2008 12:52:06 +0000
Subject: Re: Writing my own web based user forum
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-277582@lists.php.net to get a copy of this message
So are you suggesting, create the users in the forum, and then just serialize/unserialize when needed to store the info so when they go to the picture upload side it queries the forum database? On Aug 1, 2008, at 8:07 AM, Bernhard Kohl wrote:
<?php #User authentication should not be a problem at all. #If you want it simple just serialize a user class and write it to a file or into a DB. class user { var $username; var $pw; function set_user($name, $pw) { $this->pw = md5($pw); $this->username = $name; return true; } } $new_user = new user(); if ($new_user->set_user('Joe', 'swordfish') { $fp =@ fopen('/some_dir/users.txt', 'a'); @fwrite($fp, serialize($new_user)); @fclose($fp); } # the next time you need it simple read it in again with unserialize() ?> On Fri, Aug 1, 2008 at 1:49 PM, Jason Pruim <japruim@raoset.com> wrote:
Hi Everyone, I am looking at writing my own web based user forum somewhat for my own knowledge, and because I know that I don't know enough to be able to tie in authentication so they only need 1 user account. Does anyone have any examples short of downloading something like phpbb and tearing it apart? It will probably be really light weight, basic forum that hopefully will expand into more as time goes on :) I've tried searching the web but have not been able to turn up any help unless I was to write a bridge for a song... Any knowledge you can bestow upon me is greatly appreciated! Thanks! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@raoset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@raoset.com

« previous php.general (#277582) next »