//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Ahoj chtěl bych se zeptat jestli nejde nějak z url, která toto volá vytáhnout get parametry?
Děkuju
Zdroják:
#include <EtherCard.h>
// Ethernet IP, default gateway and MAC addresses static byte myip[] = { 192,168,1,200 }; static byte gwip[] = { 192,168,1,1 }; static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
byte Ethernet::buffer[500]; // tcp/ip send and receive buffer
char page[] PROGMEM = "HTTP/1.0 503 Service Unavailable\r\n" "Content-Type: text/html\r\n" "Retry-After: 600\r\n" "\r\n" "<html>" "<head><title>" "Hello World!" "</title></head>" "<body>" "<h3>Hello World! This is your Arduino speaking2!</h3>" "</body>" "</html>";
void setup(){ Serial.begin(57600); Serial.println("\n[Hello World]");
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) Serial.println( "Failed to access Ethernet controller"); ether.staticSetup(myip, gwip);
ether.printIp("IP: ", ether.myip); ether.printIp("GW: ", ether.gwip); ether.printIp("DNS: ", ether.dnsip); }
void loop(){ // wait for an incoming TCP packet, but ignore its contents if (ether.packetLoop(ether.packetReceive())) { memcpy_P(ether.tcpOffset(), page, sizeof page); ether.httpServerReply(sizeof page - 1); } }
Zobrazeno 1 zpráv z 1.