Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Challenge: Simplest VFP web application EVER! 2

Status
Not open for further replies.

dantre

Programmer
Aug 18, 2005
21
US
Hello,

Can anyone show me the absolute simplest way to call a VFP function which is housed on a web server from a client computer via a web browser?

Restrictions:
No ASP allowed. FOXISAPI confuses me (if you can make it simple, be my guest). No pay tools (i.e. WebConnection/WestWind).

Objective:
I'd like to be able to submit a name string, using an HTML form, to some VFP code (DLL/EXE/Whatever) that is sitting on a server. The code would then return a custom greeting, like...
Code:
RETURN "Hello "+cName+"!"
...to the web browser.

Is this possible?

The closest I've come was to create a COM DLL and then use VBScript CreateObject() to access it. The flaw with this is that, I believe, the client machine must have the DLL registered. Also, it requires that the user enable ActiveX (therefore it only works in IE, and may be perceived as a security threat). The ActiveX part I can deal with, however. But I can't ask every user to register a custom DLL.

I'd be very interested to see what we can come up with. This could make a great FAQ if we succeed.

Thanks in advance! -Dan
 
I make it using PHP which calls COM servers well. I don't know PHP at all, but it is realy easy to call FoxPro COM server.

F.e. on Win98 I have installed PHP for Windows and Xitami web server and I have setup Xitami to run PHP for .php extension.

In Xitami /cgi-bin folder I have a registered VFP DLL. In Xitami /webpages folder I have a .php web pages like:

<html>
<head>
<title>Current time</title>
</head>
<body>
<?php
$oCOM = new COM ("FoxDate.FoxDate") ;
echo $oCOM->FoxTime() ;
echo '</p>' ;
echo $oCOM->FoxDayWeek() ;
echo '</p>' ;
unset($oCOM) ;
?>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top