ENC28j60 Ethernet module with ESP32 - EtherCard.h library

Hello everyone, I am a little new using this library so I need some understanding it.
I have bought this ethernet module : https://robu.in/product/ethernet-module-enc28j60/?gclid=CjwKCAiA7939BRBMEiwA-hX5J-f2x8q_HWTL9LD4DZhe-dTceHFPuxcJZIRiN2wk9Ar_P9wqh30QoBoC6qQQAvD_BwE

I am using this library with ESP32 : EtherCard

I want to send data to mySQL database through php ( on localhost) . Here is my code for the same:
(The code is available in the examples of this library and I have made only few changes in it.)

#include <bufferfiller.h>
#include <EEPROM.h>
#include <enc28j60.h>
#include <EtherCard.h>
#include <net.h>
#include <stash.h>

// Demo using DHCP and DNS to perform a web client request.
// 2011-06-08 <jc@wippler.nl>
//
// License: GPLv2

// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = {0x74,0x69,0x69,0x2D,0x30,0x31};  //  0x74,0x69,0x69,0x2D,0x30,0x31 
byte Ethernet::buffer[700];
static uint32_t timer;
char Msg[] = "Hello";
char ID[]="123ABC";
char time2[]="2020-12-11%2012:12:34";
char buffer1[70];

const char website[] PROGMEM = "http://192.168.0.9/";

// called when the client request is complete
static void my_callback (byte status, word off, word len) {
  Serial.println(">>>");
  Ethernet::buffer[off+300] = 0;
  Serial.print((const char*) Ethernet::buffer + off);
  Serial.println("...");
}

void setup () {
  Serial.begin(115200);
  Serial.println("Trying to get an IP...");

  Serial.print("MAC: ");
  for (byte i = 0; i < 6; ++i) {
    Serial.print(mymac[i], HEX);
    if (i < 5)
      Serial.print(':');
  };
  Serial.println(F("\n[webClient]"));

  // Change 'SS' to your Slave Select pin, if you arn't using the default pin
  if (ether.begin(sizeof Ethernet::buffer, mymac, SS) == 0)
    Serial.println(F("Failed to access Ethernet controller"));
  if (!ether.dhcpSetup())
    Serial.println(F("DHCP failed"));

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

#if 1
  // use DNS to resolve the website's IP address
  if (!ether.dnsLookup(website))
    Serial.println("DNS failed");
#elif 2
  // if website is a string containing an IP address instead of a domain name,
  // then use it directly. Note: the string can not be in PROGMEM.
  char websiteIP[] = "192.168.0.9";
  ether.parseIp(ether.hisip, websiteIP);
#else
  // or provide a numeric IP address instead of a string
  byte hisip[] = { 192,168,0,9 };
  ether.copyIp(ether.hisip, hisip);
#endif

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

void loop () {
  ether.packetLoop(ether.packetReceive());

  if (millis() > timer) {
    timer = millis() + 5000;
    Serial.println();
    Serial.print("<<< REQ ");
    sprintf(buffer1, "&tagID=%s&RTCtimestamp=%s&GateNO=%s", ID, time2, Msg);
   // ether.browseUrl(PSTR("/push_data.php?ID=1&Key=123456"), buffer, website, my_callback);
    ether.browseUrl(PSTR("/RFID/connect4.php?"), buffer1, ether.hisip, 0);
  }
}

And I am getting following error here:

enc28j60:86:73: error: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'const char*' [-fpermissive]
     ether.browseUrl(PSTR("/RFID/connect4.php?"), buffer1, ether.hisip, 0);
                                                                         ^
In file included from C:\Program Files (x86)\Arduino\libraries\EtherCard\src/bufferfiller.h:6:0,
                 from C:\Users\shrut\OneDrive\Documents\Arduino\enc28j60\enc28j60.ino:1:
C:\Program Files (x86)\Arduino\libraries\EtherCard\src/EtherCard.h:236:17: note:   initializing argument 3 of 'static void EtherCard::browseUrl(const char*, const char*, const char*, void (*)(uint8_t, uint16_t, uint16_t))'
     static void browseUrl (const char *urlbuf, const char *urlbuf_varpart,
                 ^
exit status 1
invalid conversion from 'uint8_t* {aka unsigned char*}' to 'const char*' [-fpermissive]

I have these queries:

  1. Please help me understand the error in ether.browseUrl function.
  2. Did I pass the variables correctly in ether.browseUrl function? Because I want to pass the values through variables only.( Variables are ID, Msg, time2)
  3. How to remove this error? (one line in the code is commented, I had tried that too but got the same error)

EtherCard is good if you have memory constraints. for ESP32 use the 'normal' EthernetENC library

hey Juraj, thank you for the reply. I cheacked the library you mentioned and I found out that EthernetWebServer.h is the updated version of EthernetENC library. But I couldn't find any examples to send php code requests. Could you please help me with that in code? It would be a massive help for me!!

shruti02: hey Juraj, thank you for the reply. I cheacked the library you mentioned and I found out that EthernetWebServer.h is the updated version of EthernetENC library. But I couldn't find any examples to send php code requests. Could you please help me with that in code? It would be a massive help for me!!

the Arduino networking libraries Ethernet, WiFi, WiFi101, WiFiNINA, ESP8266WiFi or ESP32 WiFi are used in sketch the same way. so most of the examples for one of them can be modified for all others.