Grab the net with Arduino

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.

http://en.wikipedia.org/wiki/List_of_HTTP_headers

You should also provide basic debugging info like “User-Agent” etc.

Published by Shishir Sharma

Shishir Sharma is a hacker, software developer and a bachelor of electronics & communication engineering. He is a problem solver, technology enthusiast. He can speak in Java, Python, Perl, PHP, Curl etc; Fluent in C, C++, GNU/Linux. He is moderator at LUG-Jaipur. He loves action movies and Counter Strike.

Join the Conversation

2 Comments

  1. oh c’mon , yaar , how do you know such stuff , that makes me jealous of you !!!

    On line 46 of your code,what about the “RESPONSE” , and the when connection is not established ?

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.