POST request an Ethernet Shield

Hello! I raised on the Arduino server at address 192.168.0.33, Arduino reads the sensor data and outputs the data in JSON format. On the PC server raised at address 192.168.0.20, which parses the JSON response Arduino and outputs data in the right form me. With this no problems. Problems with handling Arduino POST request from the PC. The screenshot show how the request and what information I post. How do I get a string POST request to Arduino and process it?

I didnt exactly understand your problem but I can post some sensor information to a server with tese codes below. I hope it ll work for you.

if you are using ethernet library try this code

#include <DHT.h>
#include <Ethernet.h>
#include <SPI.h>

byte mac[] = { 0x00, 0xAB, 0xBC, 0xCC, 0xDE, 0x01 }; // RESERVED MAC ADDRESS
EthernetClient client;

#define DHTPIN 2 // SENSOR PIN
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

long previousMillis = 0;
unsigned long currentMillis = 0;
long interval = 250000; // READING INTERVAL
int i=0;
int t = 0; // TEMPERATURE VAR
int h = 0; // HUMIDITY VAR

void setup() {
Serial.begin(9600);
 pinMode(3, INPUT);      // sets the digital pin as output
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
}
dht.begin();
delay(10000); // GIVE THE SENSOR SOME TIME TO START

}
int k(){
   if(digitalRead(3)){
        return 0;
       }else{
        return 1; 
       } 
       
}
int m(){
   if(analogRead(A0)<1022){
        return 1;
       }else{
        return 0; 
       } 
       
}

void loop(){
h = (int) dht.readHumidity();
t = (int) dht.readTemperature();
Serial.println(analogRead(A0));
String a = String(k());
String b = String(m());
String data = "Temperature=";
data.concat(t);
data.concat("&Humidity=");
data.concat(h);
data.concat("&Door=");
data.concat(a);
data.concat("&intrusion=");
data.concat(b);
if (client.connect("tzty.cf",80)) { // REPLACE WITH YOUR SERVER ADDRESS
client.println("POST /kameratest/post.php  HTTP/1.1");//REPLACE WITH YOUR URLS
client.println("Host: www.tzty.cf");
client.println("Content-Type: application/x-www-form-urlencoded");
client.println("Connection:close");
client.print("Content-Length:");
client.println(data.length());
client.println();
client.print(data);

client.flush();
client.stop();
}

delay(60000); // WAIT FIVE MINUTES BEFORE SENDING AGAIN
}

if you are using Ethercard library try this one

#include <EtherCard.h>
#include <DHT.h>

int t = 0; // TEMPERATURE VAR
int h = 0;
// ethernet interface mac address, must be unique on the LAN
byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

const char website[] PROGMEM = "tzty.cf";
#define DHTPIN 2 // SENSOR PIN
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
byte Ethernet::buffer[400];
uint32_t timer;
Stash stash;

void setup () {
  Serial.begin(9600);
dht.begin();
  if (ether.begin(sizeof Ethernet::buffer, mymac,10) == 0) 
    Serial.println( "Failed to access Ethernet controller");
  if (!ether.dhcpSetup())
    Serial.println("DHCP failed");

  ether.printIp("IP:  ", ether.myip);
  ether.printIp("GW:  ", ether.gwip);  
  ether.printIp("DNS: ", ether.dnsip);  

  if (!ether.dnsLookup(website))
    Serial.println("DNS failed");

  ether.printIp("SRV: ", ether.hisip);
}

int k(){
   if(digitalRead(3)){
        return 2;
       }else{
        return 3; 
       } 
       
}
int m(){
   if(analogRead(A0)<1022){
        return 1;
       }else{
        return 0; 
       } 
}
void loop () {
h = (int) dht.readHumidity();
t = (int) dht.readTemperature();
  ether.packetLoop(ether.packetReceive());

  if (millis() > timer) {
    timer = millis() + 10000;   
    byte sd = stash.create();
   stash.print("Sicaklik=");
   stash.print(t);
   stash.print("Nem=");
   stash.print(h);
    stash.print("Kapi=");
   stash.print(k());
    stash.print("mudahele=");
   stash.print(m());
   stash.save();

   // dont forget to replace server url s according to your server
    Stash::prepare(PSTR("POST /kameratest/post.php HTTP/1.1" "\r\n"
                        "Host: www.tzty.cf" "\r\n"
                        "Content-Type: application/x-www-form-urlencoded" "\r\n"
                        "Connection:close""\r\n"
                        "Content-Length: $D" "\r\n"
                        "\r\n"
                        "$H"),
             stash.size(), sd);
 Serial.println(sd);
    // send the packet - this also releases all stash buffers once done
    ether.tcpSend();
   
  }
}