Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Timothy Boronczyk's Blog:
Paste Ninja (a new kind of pastebin)
Dec 08, 2008 @ 17:19:37

Timothy Boronczyk has posted about a new site/service he's created with PHP - Paste Ninja. He details it more in the post:

Paste Ninja is a pastebin application that lets you to share code snippets with others. Instead of flooding an IRC channel or your Instant Messenger conversations with lines of source code, you can paste it online for public viewing.

The world probably doesn't need another pastebin app, either, but there are several features in store that other pastebins don't have.

Features for Paste Ninja include:

  • the ability to create threaded pastes,
  • set an expiration date for the entry,
  • set a password to protect the code,
  • see how many times its been viewed
  • set the comments on a line-by-line basis
  • and - a very cool feature - submitting it via an email account versus just through the site.

tagged: pasteninja pastebin email password expire threaded

Link:

Andy Bakun's Blog:
Race Conditions with Ajax and PHP Sessions
Nov 14, 2006 @ 15:49:00

Race conditions in applications can be one of the hardest things to work out the kinks on, especially in a more complex application you're adding the new functionality to. One such instance comes up when you add Ajax functionality into the mix. Because of its asynchronous nature, it can cause a race condition version easily. Andy Bakun has been there and done that in his code and has found some helpful hints he's sharing in this (info packed) post over on his blog.

One of the problem with race conditions is that it is often difficult to actually witness the ramifications of one when it happens, especially if you are not aware of it. If you've used PHP's built-in, default session handling (that uses files), you'll never come across the problem. However, things get interesting once you start using session_set_save_handler to write your own session handler.

He breaks it down into some more manageable chunks:

  • A Multi-processing but non-Threaded Environment
  • The Default PHP Session Handler
  • Observing the Race Condition
  • The Demo App Interface
  • Resource Contention
  • Minimizing Lock Holding Time
  • Why is per-variable locking important?
  • Rolling Your Own Session Handler
  • The Code
See? You didn't believe me when I said it was long...there's tons of great info in there about working with sessions in PHP and how to get Ajax to play nice when manipulating the data inside them. There's plenty of test code and some sidebars with additional information to keep you reading for a while. Be sure to check this one out, even if you're just working with PHP sessions and Ajax and don't have a race condition issue in your app - never hurts to be prepared.

tagged: ajax session threaded handler race condition tutorial lock ajax session threaded handler race condition tutorial lock

Link:

Andy Bakun's Blog:
Race Conditions with Ajax and PHP Sessions
Nov 14, 2006 @ 15:49:00

Race conditions in applications can be one of the hardest things to work out the kinks on, especially in a more complex application you're adding the new functionality to. One such instance comes up when you add Ajax functionality into the mix. Because of its asynchronous nature, it can cause a race condition version easily. Andy Bakun has been there and done that in his code and has found some helpful hints he's sharing in this (info packed) post over on his blog.

One of the problem with race conditions is that it is often difficult to actually witness the ramifications of one when it happens, especially if you are not aware of it. If you've used PHP's built-in, default session handling (that uses files), you'll never come across the problem. However, things get interesting once you start using session_set_save_handler to write your own session handler.

He breaks it down into some more manageable chunks:

  • A Multi-processing but non-Threaded Environment
  • The Default PHP Session Handler
  • Observing the Race Condition
  • The Demo App Interface
  • Resource Contention
  • Minimizing Lock Holding Time
  • Why is per-variable locking important?
  • Rolling Your Own Session Handler
  • The Code
See? You didn't believe me when I said it was long...there's tons of great info in there about working with sessions in PHP and how to get Ajax to play nice when manipulating the data inside them. There's plenty of test code and some sidebars with additional information to keep you reading for a while. Be sure to check this one out, even if you're just working with PHP sessions and Ajax and don't have a race condition issue in your app - never hurts to be prepared.

tagged: ajax session threaded handler race condition tutorial lock ajax session threaded handler race condition tutorial lock

Link:

DevShed:
Creating an Administration Area for a Simple Threaded Discussion Forum
Oct 23, 2006 @ 17:12:00

DevShed continues their look at creating a simple treaded discussion foum with part two in the series, a focus on creating the administrator panel to help you manage users and the topics/comments they make.

This article, the second of two parts, will show you how to set up an administration area for a threaded discussion forum, and some of the functions you might want an administrator to manage.

Included is the functionality to get a listing of all of the topics, delete topics quickly, start a new topics, and manage a "blacklist" of bad words to keep out of the discussions. Of course, the code is all there and they explain each piece of it. They keep it simple though - the code is pretty procedural with only functions dividing up the functionality into the pieces.

tagged: administration forum simple tutorial threaded blacklist topics function administration forum simple tutorial threaded blacklist topics function

Link:

DevShed:
Creating an Administration Area for a Simple Threaded Discussion Forum
Oct 23, 2006 @ 17:12:00

DevShed continues their look at creating a simple treaded discussion foum with part two in the series, a focus on creating the administrator panel to help you manage users and the topics/comments they make.

This article, the second of two parts, will show you how to set up an administration area for a threaded discussion forum, and some of the functions you might want an administrator to manage.

Included is the functionality to get a listing of all of the topics, delete topics quickly, start a new topics, and manage a "blacklist" of bad words to keep out of the discussions. Of course, the code is all there and they explain each piece of it. They keep it simple though - the code is pretty procedural with only functions dividing up the functionality into the pieces.

tagged: administration forum simple tutorial threaded blacklist topics function administration forum simple tutorial threaded blacklist topics function

Link:

DevShed:
Creating a Simple Threaded Discussion Forum
Oct 16, 2006 @ 15:57:00

DevShed starts off another two parts series today with a look at a common feature of many a community site out there - the creation of a simple forum to allow visitors to interact and discuss the latest.

Most websites have some method of interacting with a visitor. Some have a chat system and others have shoutboxes or other ways to attract the visitor to return. One of the most used methods is a discussion forum. And this is what we are going to create and discuss in this article.

This is part one they create the main index page, listing out the current topics, a "view article" page to show the details of the post, and, of course, a way to respond to the current thread for any and all to use. Keep an eye out for the next article where they create the administrative section for the application.

tagged: tutorial simple threaded discussion forum man view post reply tutorial simple threaded discussion forum man view post reply

Link:

DevShed:
Creating a Simple Threaded Discussion Forum
Oct 16, 2006 @ 15:57:00

DevShed starts off another two parts series today with a look at a common feature of many a community site out there - the creation of a simple forum to allow visitors to interact and discuss the latest.

Most websites have some method of interacting with a visitor. Some have a chat system and others have shoutboxes or other ways to attract the visitor to return. One of the most used methods is a discussion forum. And this is what we are going to create and discuss in this article.

This is part one they create the main index page, listing out the current topics, a "view article" page to show the details of the post, and, of course, a way to respond to the current thread for any and all to use. Keep an eye out for the next article where they create the administrative section for the application.

tagged: tutorial simple threaded discussion forum man view post reply tutorial simple threaded discussion forum man view post reply

Link:


Trending Topics: