How to access a website with multiple virtual hosts from Arduino Ethernet Shield. The problem is if you have used Arduino Ethernet Shield, then you know that you can connect a IP, But if the IP has multiple virtual hosts, it will only connect to default virtual host. If it is commercial shared VPS, You wont be able to make your site default.
Gist is use of HTTP protocol which allows you to define host in your request on virtual host server. Here are the possible headers.
You should also provide basic debugging info like “User-Agent” etc.
I spend most time with IRB or Rails/console. These are good settings on which I have settled with over the time. These will allow you to have basic logging and IRB history. Just put these in the ~/.irbrc file (If file doesn’t exist then create one).
First thing you do when you get a Ethernet Shield for Arduino (in my case Duemilanove). You will be uploading various example sketches. I was doing the same Ardoino was working flawlessly and then I got stuck in WebClient sketch.
I did all the things I could do.
- Reset Arduino.
- Reset Ethernet Shield.
- Change Ethernet cat5 cable to shorter one.
- Change Router setting.
- Change MAC address in program.
- Change last 2 octets of IP 192,168,6,xxx to 192,168,1,xxx.
- At last Google about this issue.
Point to be noted I was able to run WebServer sketch and it was flawless. So I was sure shield is good.
With a quick google found this thread on http://www.arduino.cc.
Some one said that don’t connect google ;). Bingo. Its Google.
Fcuk that. But WebClient too works flawlessly.
We serf net. We do it every day. Now days I (Shishir criss Sharma) have 2Mbps Broad Band Internet connection. But still life needs more.
I used to have a slow connection of 56Kbps few months back. Bandwidth was a big issue at that time (Its still a issue 🙂 ). But India is shining we have very cheap Broad Band connection now days.
When i was on 56Kbps i had this habit of making off line cache of useful pages. I usually used the
HTTrack Website Copier
“It allows you to download a World Wide website from the Internet to a local directory,building recursively all structures, getting html, images, and other files from the server to your computer. Links are rebuilt relatively so that you can freely browse to the local site (works with any browser). You can mirror several sites together so that you can jump from one to another. You can, also, update an existing mirror site, or resume an interrupted download””
Continue reading “Spiderzilla”
I always appreciate coding in standard C++. Desktop Calculator is a application coded in Standard C++. It is a application based on the example 6.1 in the book “The C++ Programming Language”, Third Edition by Bjarne Stroustrup. Desktop Calculator is a GPL software.