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: Apr 23 @ 00:39:23

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 7.32.2 (.NET Handler)
.GetBrowser() Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
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() 3.144.187.103
.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")
.GetExtraHeader("Keep-Alive")
.GetExtraHeader("User-Agent") Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
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=