Sending strings from PHP to a freepascal lazarus executable lazarus / 23-Operating Systems ---------------------------------------------------------------------- pascalbythree · 2018-01-11 15:13 Hey! Does anybody have a URL / Example code for how to exchange strings from a PHP thread on a Raspberry to a lazarus executable ? Or a name for a component set? Greets, Wouter van Wegen ---------------------------------------------------------------------- Phil · 2018-01-11 15:31 Quote from: pascalbythree on January 11, 2018, 04:13:04 pmHey! Does anybody have a URL / Example code for how to exchange strings from a PHP thread on a Raspberry to a lazarus executable ? Or a name for a component set? Maybe write a PHP extension in Pascal? https://en.wikipedia.org/wiki/Php4delphi Maybe supply more detail here. Why PHP? What's it used for? That sort of thing. ---------------------------------------------------------------------- Leledumbo · 2018-01-11 18:18 Depends on how they communicate each other. You can use PHP's built-in exec, Pascal executable will just receive it as normal command line parameters. ---------------------------------------------------------------------- balazsszekely · 2018-01-11 21:23 Basic communication: 1. PHP - Save as lazarus.php, copy to your local server: Code: PHP  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 2. Lazarus - Create a new project, add a TButton, create OnClick event: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses fphttpclient; procedure TForm1.Button1Click(Sender: TObject);var  FPHTTPClient: TFPHTTPClient;  SL: TStringList;  Str: String;begin  FPHTTPClient := TFPHTTPClient.Create(nil);  try    FPHTTPClient.AllowRedirect := True;    SL := TStringList.Create;    try      SL.Add('a=' + IntToStr(9));      SL.Add('b=' + IntToStr(6));      try        Str := FPHTTPClient.SimpleFormPost('http://localhost/lazarus.php', SL);      ShowMessage(Str);      except        on E: exception do          ShowMessage(E.Message);      end;    finally      SL.Free;    end;  finally    FPHTTPClient.Free;  end;end;