title: Processing PHP scripts from within C#
body: <p>I'm not sure if this has even been done before, but what I am trying to accomplish can't be explained in any great detail, but basically, what I am trying to do is Process PHP scripts from within my C# Windows Forms Application.</p>
  
  <p>I have already created a HTTP server, which works just fine. But now I need to be able to process PHP scripts aswell. We're working on a new privatised language over here, purely for learning and fun.</p>
  
  <p>(Just a little background, not completely related):</p>
  
  <p>We are now able to create a webpage like so:</p>
  
  <pre><code>Using System.Core,
  System.Http,
  System.Graphics and System.IO;
  
      protected void -&gt; Webpage(object homepage)
      {
          // Set Webpage properties.
          homepage.Name = "Home";
          homepage.Size = new Size(960[px], 100[%]);
          homepage.Alignment = new AlignmentType.Vertical;
          homepage.Alignment = new AlignmentType.Horizontal;
  
          // This is a comment.
          // Create objects to be rendered on the page.
  
          Text text = new Text();
          FormElements formElements = new FormElements();
  
          private void -&gt; Webpage.Load(object homepage)
          {
              text.Text = "Please enter your name below:";
  
              text.Style = new Style(
                  Alignment = new AlignmentType.Horizontal,
                  Alignment = new AlignmentType.ManualAlignment(15[Y, px]),
  
                  Font = new Font(
                      Font.Family("Arial"),
                      Font.Size = new Size(9[pt], LineHeight(4[px])),
                      Font.Color = new Color.FromArgb(15, 15, 15))
              );
  
              formElements.CreateElements(TextField["textField"], SubmitButton["submitButton"], Form["form"]);
  
              textField.Name = "name";
              submitButton.Name = "submit";
  
              form.Encapsulate(name, submit);
  
              form.Alignment = new AlignmentType.RelativeTo(text.Bottom);
  
              Elements[] elements = new Elements[]
              {
                  text, form;
              };
  
              homepage.Display.Element.ElementCollection(elements);
          }
  
          private void -&gt; Webpage.FormSubmission(object form)
          {
              form.Element(name).OmitSpecialCharacters();
  
              if(form.Value is not Empty)
              {
                  text.Text = "Hello, " + form.Element(name).Value;
              }
          }
      }
  </code></pre>
  
  <p>The above sample demonstrates the ability to create a whole webpage, style it, and process form input in a nice, clean way. However, we've come to a complete dead end (trying to support PHP) and we do not wish to delve too far into server-side languages (lack of experience in that area is the main reason), so we would like to be able to "support" PHP scripts from within our WinForms app.</p>
  
  <p>Anyone know of any way to process PHP scripts from within a C# winforms app?</p>