PHP
  Home arrow PHP arrow Page 5 - Chatter
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Chatter
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2004-11-08

    Table of Contents:
  • Chatter
  • Configuration
  • View Chatter
  • Manage the Chatter
  • Secure it

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Chatter - Secure it


    (Page 5 of 5 )

    You may have noticed that cbadmin.php calls a file called accesscontrol.php on the first line. This file is used to place a password on your chatterblock admin area.

    <?php
    $adlogin = "test";
    $adpassword = "test";
    if (!isset($PHP_AUTH_USER)) {
    header('WWW-Authenticate: Basic realm="ChatterBlock Admin"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Authorization Required.';
    exit;
    } else if (isset($PHP_AUTH_USER)) {
    if (($PHP_AUTH_USER != $adlogin) || ($PHP_AUTH_PW != $adpassword)) {
    header('WWW-Authenticate: Basic realm="ChatterBlock Admin"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Authorization Required.';
    exit;
    }else{
    session_register("aid");
    session_register("apass");
    }
    }
    ?>

    Save this file as accesscontrol.php, and you will now have password protection on your ChatterBlock Admin script.

    Conclusion

    That's it. A quick and fast tutorial. This chatterblock is very basic, can post and can view. It doesn't really have other nifty functions such as smilies or profanities checking. Once you get the basic chatterblock, you can always add features and functions later on.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Once again, after criticising the "Building a Quick and Easy Tag Board" article, I...
       · I was to trying the scripts but when others user posting into it ..iframe shout box...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT