ebook img

Visual Basic 6.0 Internet Programming PDF

406 Pages·1999·3.54 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Visual Basic 6.0 Internet Programming

To access the contents, click the chapter and section titles. Visual Basic 6.0 Internet Programming (Publisher: John Wiley & Sons, Inc.) Author(s): Carl Franklin ISBN: 0471314986 Publication Date: 02/01/99 Brief Full Advanced Search this book: Search Search Tips FOREWORD CHAPTER 1—THE INTERNET Attack of the Buzzwords! Protocols and Data Protocol Stacks and the OSI Model TCP/IP Names and Addresses Ports Name Resolution Sockets The TCP/IP Model CHAPTER 2—WINSOCK PROGRAMMING Introduction Why Not Use the Winsock API? Installing the Software Loading DSSOCK32.OCX into Visual Basic DSSOCK.BAS SocketConnect IsDotAddress ParseString Getting Started with dsSocket Making a Sockets Connection What’s Going On Here? SocketID and the Socket Property Closing the Connection Handling Multiple Connections on the Server Side Sending Data Receiving Data LineMode, EOLChar, and DataSize The Simple Approach A New Twist Splitting Up the Process with Flags A Slight Variation Event Driven = No Loops Which Approach Is Better? Error Handling Winsock Errors Error-Handling Techniques Minimal Error Trapping Debug.Print Error Trapping Message Dialog Reporting Error Log Reporting UDP—User Datagram Protocol Terminal—A Winsock Terminal Program Epilogue CHAPTER 3—SIMPLE PROTOCOLS Introduction NTP (Network Time Protocol) WHOIS FINGER SetTime Application Epilogue CHAPTER 4—USENET NEWS Introduction NNTP MessageIDs vs. Message Numbers NNTP Versions NNTP Commands Sample Conversation The WILDMAT Format Server Responses Usenet Article Format VB Programming Technique String Parsing The szParseString Function Sample Program—NNTP.VBP Connecting to an NNTP Server Retrieving an Article Header Retrieving a Complete Article Retrieving Article Information Example: Displaying Article Descriptions in a List Box Posting an Article Posting a Reply to a Previous Message Retrieving a List of Newsgroups LIST ACTIVE Returns Selective Newsgroups XGTITLE Returns Newsgroup Descriptions LIST NEWSGROUPS also Returns Newsgroup Descriptions Retrieving a List of Article Numbers Retrieving a Specific Header Field Searching for Articles by Header Server-to-Server Communication Using the cfNNTP Object Epilogue CHAPTER 5—ELECTRONIC MAIL Introduction The SMTP Protocol SMTP Commands Server Responses Reply Code Categories VB Programming Technique Brain-Dead SMTP True SMTP Connecting and Disconnecting Sample Application: SMTP.VBP Sending Mail Sending versus Mailing Replying to Mail Forwarding Mail Verifying an SMTP Address Error Handling Post Office Protocol 3 (POP3) POP3 Commands Server Responses POP3 States Authorization State Transaction State Update State VB Programming Technique Sample Program: POP3.VBP Logging into the Server Retrieving Message Headers Retrieving Messages Sending and Receiving Binary Files How UU Encoding Works UUCODE.BAS Encoding and Decoding Routines UUEncode UUDecode Sending an Encoded File with SMTP nSendFileAsMsg Using the cfSMTP and cfPOP3 Objects Epilogue CHAPTER 6—FILE TRANSFER PROTOCOL Introduction When Should You Use FTP? The FTP Program Connecting and Logging In Listing Directories Changing Directories Downloading Uploading Supported Commands Ending the Session Using a Web Browser to Download Files The FTP Protocol FTP Errata Connections FTP Commands Server Responses Reply Code Categories Visual Basic Code Using a Display Terminal FTPLogon SendFTPCommand Retrieving a Directory Listing Changing Directories Downloading a File GetFileFromURL Uploading a File Debugging Inside the FTP Code Connecting to the Server Reality Break Inside SendFTPCommand Changing Directories Creating a Data Connection Retrieving a Directory Listing Unix Wildcards Uploading a File Downloading a File Using the cfFTP Object Epilogue CHAPTER 7—ACCESSING THE WORLD WIDE WEB The World Wide Web HTTP—Hypertext Transfer Protocol HTML—Hypertext Markup Language Understanding the World Wide Web How to Read a URL HTTP Message Headers Interpreting the Server’s Response Accessing HTTP Servers in Visual Basic Accessing Forms A Brief Overview of the Common Gateway Interface (CGI) Mapping with the TIGER Map Service Sample Application—MAP NetPaper Tips for HTTP Programming Further Reading Epilogue CHAPTER 8—AN INTRODUCTION TO OBJECTS IN VISUAL BASIC Introduction Remember Type Variables? More Analogies How Do We “Make” an Object? Properties Collections Epilogue CHAPTER 9—USING THE CFINTERNET OBJECTS First Things First—cfWinsock Using the cfWinsock Object The Control Property Inside cfInternet cfNNTP Retrieving Articles Posting an Article cfSMTP—Simple Mail Transport Protocol cfPOP3—Post Office Protocol 3 cfFTP—File Transfer Protocol Epilogue CHAPTER 10—CGI4VB: SERVER-SIDE PROGRAMMING The Common Gateway Interface (CGI) CGI4VB CGI Speed Issues HTML Forms and the ACME.HTM Sample Form Form Definition Field Definitions The Submit Button Hands-On CGI CGI4VB.BAS ACME.BAS: CGI_Main and Inter_Main Dissecting Sub Main in CGI4VB.BAS CGI_Main: Where the Magic Happens Retrieving and Saving the Data Sending Data to the Client with the Send Command The Status Code Other CGI Options Epilogue CHAPTER 11—MICROSOFT INTERNET INFORMATION SERVER IDC–The Internet Database Connector Understanding File Types HTML Reserved Words Active Server Pages Accessing COM Objects in ASP Hands On ASP and Database Access Processing Input Data from a Form Returning Data to the User IIS Applications in Visual Basic 6.0 Peer Web Services WebClass Designer HTML Template WebItems Custom Tags Custom Events Custom WebItems Testing and Debugging Calling WebItems Manually from HTML Epilogue CHAPTER 12—Writing Custom Winsock Client/Server Applications The cfSocket ActiveX DLL The cfSockClient Client/Server Model Registering the cfSockClient Object on Your Computer Using a cfSockClient Object Inside the cfSockClient OLE Server Initialization Connecting to the Server Sending Data to the Server Receiving Data from the Server The Debug Flag Sending a File to the Server Receiving a File from the Server The CFServer Application Easy To Modify Receiving Unsolicited Commands from the Server Remote Data Access ODBC_OPEN ODBC_QUERY ODBC_CLOSE ODBCTest: A Sample ODBC Client Application Epilogue APPENDIX A APPENDIX B APPENDIX C APPENDIX D APPENDIX E INDEX Products | Contact Us | About Us | Privacy | Ad Info | Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. To access the contents, click the chapter and section titles. Visual Basic 6.0 Internet Programming (Publisher: John Wiley & Sons, Inc.) Author(s): Carl Franklin ISBN: 0471314986 Publication Date: 02/01/99 Brief Full Advanced Search this book: Search Search Tips Previous Table of Contents Next FOREWORD Well, here we are again. Another version of Visual Basic (VB), a new operating system, a new family of microprocessors, and another Internet programming book and fortunately for me, there aren’t that many other VB Internet programming books on the shelves, and I’m not complaining a bit. The topic of Internet programming in Visual Basic spans many tools and technologies. Many of these tools operate at a higher level than the code in this book, while some operate at a lower level. I chose to write the example code at a low enough level so that you can understand the processes, but high enough so that you’re not completely focused on code that does the arduous tasks of communications. Winsock is a library of functions and routines that all Windows programs use when they want to access the Internet. It provides the low-level functions of sending and receiving data, as well as tools for managing connections, and everything else that has to do with basic Internet communications. My code uses a Winsock control for communications, whereas some other books opt to access the Winsock library directly. I believe that it is neither beneficial nor necessary to do this. The real bottleneck in Internet communications is the Internet connection itself. You don’t gain anything by saving a few nanoseconds, if indeed you actually can. If you really want to get the best performance, get a faster Internet connection. The benefits you gain by programming at a higher level are too numerous to ignore. That said, there are other books that focus on higher level tools that do everything for you. You just tell a control to send an email message and it just happens. While most of the time this approach works great, there may be situations in which you need to make changes in the process due to the quirks

Description:
Real code examples and top-notch expertise to apply solid Internet protocols in VB. Programmers and developers need to add Internet capabilities and full-fledged components and programs to Windows and Windows NT applications. This guide helps to get the job done efficiently and effectively. Fully up
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.