Bueno, mirando los ejemplos de la librería "EtherCard" me encontré con un ejemplo de cliente web que he adaptado y simplificado y sí, he conseguido que funcione correctamente.
Realmente no entiendo como funciona el código, pero al menos funciona.
Lo dejo aquí por si a alguien le hace falta.
Saludos.
#include <EtherCard.h>
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
byte Ethernet::buffer[700];
static uint32_t timer;
const char website[] PROGMEM = "dominio.subdominio.com"; // aquí ponemos la URL sin http:// en el caso de un dominio www. sí habría que poner www pero no el http://
static void my_callback (byte status, word off, word len) {
Ethernet::buffer[off+300] = 0;
(const char*) Ethernet::buffer + off;
}
void setup () {
F("\n[webClient]");
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
F("Failed to access Ethernet controller");
if (!ether.dhcpSetup())
F("DHCP failed");
ether.printIp("IP: ", ether.myip);
ether.printIp("GW: ", ether.gwip);
ether.printIp("DNS: ", ether.dnsip);
#if 1
if (!ether.dnsLookup(website))
#elif 2
char websiteIP[] = "192.168.1.1";
ether.parseIp(ether.hisip, websiteIP);
#else
byte hisip[] = { 192,168,1,1 };
ether.copyIp(ether.hisip, hisip);
#endif
ether.printIp("SRV: ", ether.hisip);
}
void loop () {
ether.packetLoop(ether.packetReceive());
if (millis() > timer) {
timer = millis() + 5000;
ether.browseUrl(PSTR("/index.php?xxxxxx"), "", website, my_callback); // siendo xxxxxx el dato a enviar al PHP instalado en el servidor
}
}