How to format a Get Request


i have external server running mysql. have installed php script that, when accessed http deliver data 1 of tables. works fine browser:
code: [select]
http://www.seti.net/php/getevents.php
i cannot figure out how send command arduino. have ethernetclient library working , can access google in example.

when send command through client:
code: [select]
client.println("//get /php/getevents.php http/1.0");
the server returns:
code: [select]
</head><body>
<h1>method not implemented</h1>
<p>get /php/getevents.php not supported.<br />

what correct way format in arduino?

i use send temperature web server. note lack of http version , additional blank line after - not sure whether difference important works:

code: [select]

void  sendtemptoserver()
{
char getrequest[80];
if (client.connect(server, 80))
  {
  sprintf(getrequest,"get /cgi-bin/arduino.cgi?reading=%s&arduino_id=23&sensor_id=1",temperature);
  //serial.println(getrequest);
  client.println(getrequest);
  client.println();
  }
}



Arduino Forum > Using Arduino > Programming Questions > How to format a Get Request


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62