PHP a Server-Side Language
A reminder of the most important:
PHP was designed to be a Server-side language, whereas HTML,CSS,JS,
are client side languages. Hence PHP needs a server. But this property
of PHP provides a lot of Security to the user data!
If you want to be able to use PHP localy on your machine you need a server.
Nowadays WAMP (Apache, MySQL, PHP on Windows) is a good solution.
Local Server
Once a local server created you can simply make a WebRequest to:
127.0.0.1/myfile.php
The response will be your script result.
Comand Line PHP
It is also possible to run PHP from the command line but you need to remember that this means you need to have installed the latest version of PHP if thats the case for example using WAMP you would do something like this:
First check the path of the php.exe:
c:\wamp\bin\php\php5.x.y\php.exe
Here x and y are the version numbers of PHP that have been installed
Open the terminal from there or navigate to there using the cd
command
Then simply do:
php your_script.php
Using VB.NET this would give something like:
Process.Start(String.Format("cmd /k {0} & {1}", "cd c:\wamp\bin\php\php5.x.y\php.exe", "php your_script.php"))