.net - Passing GET/POST parameteres to php via commandline -


I find myself will do incalculable because I'm pretty sure there are some obvious solutions or already have an answer, but After a fairly extensive search I can not find it.

I am developing a simplified web server as a project in .net. I am calling to execute any php code within the file to every HTML request that php.exe I wanted to do, and then returns the results on my server, where it will be delivered to the client.

It is quite simple without passing the GET / POST standards, but I can not find a way to do this. The

Right now I have it as their function

  public shared function phpparse (ByVal requestType As String, ByVal argnames () calls the command line as a string through php to write, ByVal argvals () as string) dim proc process = new process proc.StartInfo.FileName as = "php \ php.exe" dim B new System.Text.StringBuilder B.Append ( B.Append ("B" "$ _") - B.Append (requestType & amp; "= Array (") I = 0 argnames.Length as integer - 1 B.Append ("'" & amp; ; Argnames (i) & amp; "'= & gt;" & Next, B.Remove (B.Length - 2, 2) B.Append (");" "Script.php") InputBox ("", "", "B", " .ToString) proc.StartInfo.Arguments = B.ToString proc.StartInfo.UseShellExecute = false proc.StartInfo.RedirectStandardOutput = true proc.StartInfo.CreateNoWindow = true proc.Start () return proc.StandardOutput.ReadToEnd end function  

Which gives something like this:

  -b "$ _GET = array ('name' = & gt; 'John', 'Email' = & gt; 'John.doe@no.com'); "-F script.php  

and this test php script should be called:

  ?   

but it is stuck trying to read the answer

" postprop =" text ">

With PHP, you can read algos like this:

   

This will return

John john.doe@no.com

I do not really know how to send you the command line parameters, just like php

php.exe John john.doe@no.com

/ Blockquote>

Comments