I recently had to transfer files as well as simple text parameters from a Java application to a PHP script. Hence, I wanted the files to be available in the global $_FILES array and the simple parameters in the global $_POST array. Unfortunately, the task is not as easy as it sounds. One has to use MIME multipart messages. And there is no native support for MIME multipart in Java. Sending Complex Data From Java to PHP via a POST Request weiterlesen
Kategorie: Java
Producing The Same SHA-512 Hash In Java And PHP
I needed to calculate the same SHA-512 hashes in Java and PHP. I thought that this would be a quite easy exercise. Unfortunately, it was not, so I decided to publish the code that finally produces the same hashes. First, let us have a look at the PHP code, which is really easy: Producing The Same SHA-512 Hash In Java And PHP weiterlesen
Sending Simple Data From Java to PHP via a POST Request
In my bachelor thesis, I develop an interface between a Java and a PHP application. Hence, I have to transfer data between the two applications. I decided to use a POST request in order to transfer data from the Java to the PHP application. Since sending a POST request from Java is not documented that good yet, I would like to show you my working code: Sending Simple Data From Java to PHP via a POST Request weiterlesen