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:
i cannot figure out how send command arduino. have ethernetclient library working , can access google in example.
when send command through client:
the server returns:
what correct way format in arduino?
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
Post a Comment