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 14 @ 10:29:40

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 Handler 8.1.2 (.NET Handler)
.GetBrowser() CCBot/2.0 (https://commoncrawl.org/faq/)
Fox Version() Visual FoxPro 09.00.0000.7423 EXE Support Library for Windows
.oConfig.cVersion 1.0
.GetPreviousUrl()
.GetCurrentUrl() https://www.west-wind.com/wconnect/TestPage.wwd?Name=Rick&Company=West+Wind
.GetHttpVerb() GET
.GetIPAddress() 18.97.9.168
.GetServerName() www.west-wind.com
.GetPhysicalPath() c:\webconnection\fox\web\TestPage.wwd
.GetLogicalPath() /wconnect/TestPage.wwd
Server Port 443 (Hint: Try this page securely with https://)
.IsLinkSecure() Yes
Server Software Microsoft-IIS/10.0 Local IP: 149.28.15.235
Authenticated User
User's Language en-US
Content-Type

Query String (URL Parameter) Retrieval

.QueryString() Name=Rick&Company=West+Wind
.QueryString(1) Name=Rick&Company=West Wind
.QueryString('FirstName')
.QueryString('Company') West Wind
.Form('FirstName')
.Form('Company')

Client HTTP Headers

.GetExtraHeader("Accept-Encoding") br,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=