Question on Ardino ethernet Shield and Max7219 Dot Matrix 4-in-1

Hello Everyone
i am new in programming. i want to create a counter that count digit from 0 to 9999 with arduino uno,ethernet shield and MAX7219 Dot Matrix 4-in-1.
i want to send a command from web broswer or Hercules that can display on Max7219. please some one can write a code for me.
this is me code.
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#include <Ethernet.h>
#include <SPI.h>

byte mac = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192, 168, 1, 20);

EthernetServer server(23);

EthernetClient clients[8];

#define MAX_DEVICES 4

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 9


void setup(void) {
Ethernet.begin(mac, ip);

while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only

// start listening for clients



void loop(void) {
EthernetClient newClient = server.accept();

if (newClient) {
for (byte i = 0; i < 24; i++) {
if (!clients) {
newClient.print("Hello, client number: ");
// Once we “accept”, the client is no longer tracked by EthernetServer
// so we must store it into our list of clients
clients = newClient;



// check f0or incoming data from all clients
char c[4];

for (byte i = 0; i < 8; i++) {
while (clients && clients.available() > 0) {
// read incoming data from the client
//String c;



// stop any clients which disconnect
for (byte i = 0; i < 8; i++) {
if (clients && !clients.connected()) {



I've deleted your other cross-post @Noman-Jameel.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.