Hello World from Visual FoxPro

This example uses low level, raw Response.Write() operations to echo back some of the server information provided by Web Connection requests. This raw output is one option for creating Web Connection apps purely using code. While useful for low level applications/data handlers and purely data driven applications, there are other higher level scripting mechanisms available to provide easier HTML editing outside of code.

Local server time is: Dec 15 @ 07:24am

This page was dynamically generated by a Visual FoxPro server that responds to the request you see in your browser's 'Location' or 'Address' line.Following are a few examples of the custom methods provided by the wwRequest class that return common settings from Web requests.

Common Request and Server Info

.GetDLLVersion() Web Connection 6.5 (.NET Handler)
.GetBrowser() CCBot/2.0 (https://commoncrawl.org/faq/)
.GetPreviousUrl()
.GetCurrentUrl() https://www.west-wind.com/WConnect/TestPage.wwd?Name=Rick&Company=West+Wind
.GetHttpVerb() GET
.GetIPAddress() 54.82.10.219
.GetServerName() www.west-wind.com
.GetPhysicalPath() C:\webconnection\Web\wconnect\TestPage.wwd
.GetLogicalPath() /WConnect/TestPage.wwd
Server Port 443 (Hint: Try this page securely with https://)
.IsLinkSecure() Yes
Server Software Microsoft-IIS/10.0
Authenticated User
User's Language en-us

Query String (URL Parameter) Retrieval

.QueryString() Name=Rick&Company=West+Wind
.QueryString(1) Name=Rick&Company=West Wind
.QueryString(2)
.QueryString(3)
.QueryString('Name') Rick
.QueryString('Company') West Wind

Client HTTP Headers

.GetExtraHeader("Accept-Encoding") gzip
.GetExtraHeader("Keep-Alive")
.GetExtraHeader("User-Agent") CCBot/2.0 (https://commoncrawl.org/faq/)
Retrieving Form Variables
Retrieving form variables is just as easy. You can simply use the wwRequest::Form() method to retrieve any form variable as a string. Variables are decoded including long text fields and those containing control characters.

Here are the form variables captured (set only on Postback):

*** Collect form variable values into local vars
lcFirstname=
lcLastName=  
lcCompany=