Date:  05/20/2019 06:03:59 PM Msg ID:  004987
From:  FoxWeb Support Thread:  004986
Subject:  Re: Call PHP script within Foxweb script
Both FoxWeb and PHP work directly on requests received from the Web server, so you can't "call" a PHP script from a FoxWeb script. The only way to use both FoxWeb and PHP in the same application is to route data through the browser:
Option 1: If you don't have a lot of data, then the easiest way is to return an HTTP redirect from a FoxWeb script, pointing to the URL of your PHP script. Any data you want to pass can be part of the query string (at the end of the URL, after the "?" character). Note that data will need to be URL encoded.
Option 2: If you want to pass a large amount of data (more than a few thousand bytes) you may want to return an HTML page to the browser, containing a form with the data you want to pass to PHP. You can either ask the user to submit the form, or you can place the data in hidden fields and auto-submit through JavaScript.
When the PHP script is done, you can use one of the above techniques to return the user back to your FoxWeb scripts.
One final possibility would be to utilize an HTTP COM object to make a direct HTTP request from your FoxWeb script to the PHP script. Basically, instead of having the browser make this request, you will construct a URL similar to option one, but everything will happen on the server. This is similar to making a server-to-server API request, but I don't know your circumstances and whether this makes sense.
FoxWeb Support Team email
Sent by Olatunji Beckley on 05/20/2019 01:19:51 AM:
Hi all,
Does anyone know how to call a php script from a foxweb script without using the form submit technique (i.e. specifying a php file to submit data to).
I would like to call the php script after data submission and validation in the foxweb script.