ip address issue with ethernet shield

hi I am using a tutorial code just to learn about using the ethernet shield.

in the arduino code i am using

//ARDUINO 1.0+ ONLY
//ARDUINO 1.0+ ONLY
#include <Ethernet.h>
#include <SPI.h>

////////////////////////////////////////////////////////////////////////
//CONFIGURE
////////////////////////////////////////////////////////////////////////
byte server[] = { 68,178,00,00 }; //ip Address of the server you will connect to

//The location to go to on the server
//make sure to keep HTTP/1.0 at the end, this is telling it what type of file it is
String location = "/home/content/a/b/c/abcxyx/html/arduino/ HTTP/1.0";

I am having problem configuring the IP and location string.

In a browser, I can access the target by www.abc.com/arduino and if I ping www.abc.com I get 68.178.00.00, but I can’t access the target with 68.178.00.00/arduino. I tried various combinations but still no go. I know this is probably a simple thing but somehow my mind is blank on this.

Can anybody tell me how to convert www.abc.com so that it is ipaddressable?

Thanks

68.178.00.00 isn't a valid IP address.

Are you using "abc.com" as a generic domain name or did you mean the actual "abc.com"?

both ip and domain are "fake"

but I have seperately confirmed both address are functioning.

i am following this example http://bildr.org/2011/06/arduino-ethernet-client/

when i change out the ip address and location in the code, i get different results

when using localhost 127.0.0.1 i does not connect when I use the godaddy host ip, i get

connecting...
connected
disconnecting.
!DOCTYPE HTML PUBLIC "-//IETF//D0

joefly: when I use the godaddy host ip, i get

Godaddy and other virtual hosts use the domain name to determine which "site" you are trying to access. So unless you pay for a static IP, you can't connect using just the IP.

thanks James, That makes sense. in this regards, generally speaking is there a way to use the arduino as a client to talk to a godaddy server such as www.abc.com without using ip address?

ok now regarding using local host. when I use a browser and go to 127.0.0.1/test the output is as expected, but using this

byte server[] = { 127,0,0,1 }; //ip Address of the server you will connect to

//The location to go to on the server
//make sure to keep HTTP/1.0 at the end, this is telling it what type of file it is
String location = "/test/ HTTP/1.0";

i get this

connecting...
connection failed
connecting...
connection failed
connecting...
connection failed
connecting...
connection failed
connecting...
connection failed

Well, 127.0.0.1 is the client. So unless your arduino is both the client and server, why would you expect that to work?

What are you trying to do? If want to upload data somewhere, look at pachube.com

I am not sure what you mean that 127.0.0.1 is a client, I have a WAMP installed and 127.0.0.1 is a localhost that is serving up the php code of the example that I am following. Following the example, using the browser, I go to 127.0.0.1, the browser prints out a random 6 digit code.

My project or ultimate goal, is that I presently have a python code that runs on my computer which grabs web scrapped data and serially gives it to the arduino, my goal is to eliminate the computer being on, so with a arduino ethernet i hope to have it go to a server that has php/python code to scrap the required info and passed it back to the arduino.

thanks for your help

If my understanding of that tutorial is that you are trying to use your board as a webclient and would like to connect to www.whateverwebsite.com instead of using the IP address of the webhost. I belive the Ethernet.h does not support DNS addressing which means you must use ip address. IE http://XXX.XXX.XXX.XXX DNS support will take http://www.abc.com and poll the DNS server for the IP address. Apparently the link below has a lib with DHCP,DNS and Bonjour support. Take a look however i have never used it but i hope it helps http://gkaindl.com/software/arduino-ethernet/

joefly: I am not sure what you mean that 127.0.0.1 is a client, I have a WAMP installed and 127.0.0.1 is a localhost

A device that attempts to connect to 127.0.0.1 can only connect to itself. That's localhost. So when your PC connects to 127.0.0.1 it connects to yourself. When your Arduino connects to 127.0.0.1, it connects to itself.

james, thanks, I changed the 127.0.0.1 to my computer's local ip address and it worked

jhub, thanks for the link. I am still trying to figure out how to use it..