connect to

I’m new with arduino and ethernet shield,in here i want to connect my arduino with through ethernet,Here is the code of my arduino but i don’t know how to code to make it connect with arduino.Can anyone help me?
I really appreaciate any help :slight_smile:

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

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,8);
IPAddress serverIP (192,168,1,1);
int serverPort = 7119;
EthernetClient client ;

void setup() {

  Serial.println("Starting w5100");


 if (client.connect(serverIP, serverPort)) {
    Serial.println("connected");//report it to the Serial
    String msg="Hello Server";//Message to be sent
    Serial.println("sending Message:"+msg);//log to serial
    client.println(msg);//send the message
  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");

void loop()
  // if there are incoming bytes available 
  // from the server, read them and print them:
  if (client.available()) {
    char c =;

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();//report it to the serial

    // do nothing forevermore:

i want to connect my arduino with through ethernet

Why? You'll need to make your application emulate the httpd daemon that normally runs on a server. Not a trivial thing to do.