Executing PHP script in TWebbrowser

I'm trying to call a website and pass/receive information back.
A php script was provided and I am trying to run it locally thru Delphi and not on a web server.
I've navigated to blankpage and loaded the following as a persistent stream into the WebBrowser-
  <http><body><? php require ("C:xxxxxxxx.php") ?></body></html>
The script has functions that can be called to pass URLs and keyword values such as
 function buildxml($item,$key).
How can I access these functions in the php script from the webbrowser page?
Who is Participating?
aikimarkConnect With a Mentor Commented:
You could use the TIdHttp class, as illustrated in this article:


There is also a PHP4Delphi opensource interface now at SourceForge:
Geert GOracle dbaCommented:
you mean you want your delphi program actually working as a php webserver ?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
It really doesn't work that way.  PHP can be used thru the command line or on a web server to generate a page.  The PHP interpreter normally has to be called first and you get it's output (STDOUT) unless you have written a method to call PHP in your Delphi code.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Impossible, PHP script work just inside a webserver.
But you can execute javascript in webbrowser
You could run a php script in php command line interpreter. It is possible to open a browser window with php com. See http://www.tuxradar.com/practicalphp/14/1/3

If you want your application to talk to the web site you should use WinInet library.

We sure could use some feedback from you about our comments.
sshireyAuthor Commented:
Based on information given, I created a package to perform the editting done by the php script and generate the XML page to POST.
I wish to thank everyone for their assistance.
Dave BaldwinFixer of ProblemsCommented:
Cool, thanks for the points.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.