PHP
  Home arrow PHP arrow Page 2 - Building A Document Request Protocol Part ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
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

Building A Document Request Protocol Part 1/2
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2002-02-23

    Table of Contents:
  • Building A Document Request Protocol Part 1/2
  • Our protocol: SARP
  • The VB application
  • The ProcessCommands routine
  • Accepting new records from the client
  • Our VB App in action
  • Conclusion

  • 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


    Building A Document Request Protocol Part 1/2 - Our protocol: SARP


    (Page 2 of 7 )

    We are going to create a protocol that will be used to request and modify a set of categories and articles. The protocol will be called Simple Article Request Protocol, or SARP for short.

    The protocol will, in some ways be similar to the NNTP protocol. Here’s a list of the functions that our protocol will implement:
    • Logging in
    • Retrieving a category name
    • Retrieving a list of articles based on a category ID
    • Adding a new category
    • Adding a new article under a specific category
    The protocol will expect simple text requests for its commands, and will operate on port 2002 by default. The categories and articles will be stored in an Access 2000 database, and the actual implementation of the protocol will be carried out using Visual Basic and the Winsock control.

    Because the source code and accompanying program files for this article are rather large, we will only look at the most important parts of our implementation. You can download all of the code from the support material link, which is on the conclusions page.

    Let's start by looking at the Access database that will hold our two tables: categories and articles:

    The categories table

    The articles table

    The id field of the categories table links it to the articles table by the catId field. The fields in the tables should be self-explanatory. We will fill our database with the brands and models of luxury cars, as shown below:

    Our access database

    Our Access database will be responsible for providing our Visual Basic application with the data so that it can fulfill its SARP protocol requests to the client. Let's look at the Visual Basic application now.

    More PHP Articles
    More By Mitchell Harper


     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway