Larry, Yes, the PHP script will reside on my web server along with the MySQL database. I assumed that I would call the script over HTTP, but I guess that is part of my question too. Foxpro allows you to embed controls in its forms, and one of them is a browser control. But I don't really want to echo anything to the enduser, I just want to capture the data behind the scenes, so to speak. I think I can handle that with the browser control.
If I understand you correctly, when I do an echo statement or a print statement (or a return()?), it will return the data to the desktop app. And the best way to return it is in xml. I'll investigate the methods you mention for converting xml since I'm not familiar with any of them. Thanks! Ken On 3/4/2011 6:51 PM, la...@garfieldtech.com wrote: > Assuming you mean that the PHP script is on a web server somewhere and the > desktop app is hitting it over HTTP, it's no different than any other > response. Anything you print will be sent back to the client, in this case > your desktop a.. So if you want to send XML back, you'd build a string with > your XML (either manually or using the DOM or SimpleXML APIs or a 3rd party > like QueryPath or whatever floats your boat) and print it, just as you would > HTML. > > Note that you may need to explicitly set headers with header() to make sure > the desktop app reads it properly. > > --Larry Garfield > > On 3/4/11 5:48 PM, Ken Watkins wrote: >> Hi All. >> >> I have a Windows desktop app that I created using Visual Foxpro (a database >> app). >> I want to write a PHP script that I will call from my desktop app. The >> script will simply >> query a MySQL database on my web server and return the recordset to the >> desktop app. >> >> My question is simply this: What is the preferred method for passing this >> recordset back >> to the desktop app? I'm assuming that there's no reasonable way to send a >> recordset back >> without converting it to an array or XML or an object or something? How do I >> return the >> data in the recordset to the desktop app? >> >> Thanks for your advice. >> Ken Watkins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php