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?
sshireyAsked:
Who is Participating?
 
aikimarkConnect With a Mentor Commented:
You could use the TIdHttp class, as illustrated in this article:

http://stackoverflow.com/questions/5050714/how-to-send-data-to-a-php-script-and-imediatelly-get-data-back-from-the-same-scri

There is also a PHP4Delphi opensource interface now at SourceForge:
http://sourceforge.net/projects/psvlib/files/PHP4Delphi/
0
 
Geert GOracle dbaCommented:
you mean you want your delphi program actually working as a php webserver ?
0
 
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.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Mahdi78Commented:
Impossible, PHP script work just inside a webserver.
But you can execute javascript in webbrowser
0
 
rruschCommented:
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.
0
 
aikimarkCommented:
@sshirey

We sure could use some feedback from you about our comments.
0
 
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.
0
 
Dave BaldwinFixer of ProblemsCommented:
Cool, thanks for the points.
0
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.