Chat freely about anything...

User avatar
By tilz0R
#1553 Hi community.

I have a simple question.
How to connect with this module to specific web page?

I had successfully connected device to Wifi.

Let's say I want to connect to this forum and get it's data back.
I have to connect to IP, that this forum is hosted on (70.38.12.79), but if I connect to this IP directly, I will not get esp8266.com forum but first page from forum host.

And now, how can I connect to esp8266.com, not to server's home page?

I'm successfully linked with TCP to 70.38.12.79 but when I received data, i got them from server's first page, not from esp8266.

How next?

Thanks for answers.
User avatar
By gbit
#1580 Presumably you now need to implement some minimal http protocol client. There are many versions of this on the web. Using the protocol you provide the URL you're requesting, and that tells the server you want www.esp8266.com and not some other website (a single server can host many sites that way).
User avatar
By villTech
#1609 you dont need a fw for that.
you just need to do http commands.
once you are connected to: 70.38.12.79
issue: GET http: //www.esp8266.com/viewtopic.php?f=6&t=338

esp8266 will output below:
Code: Select all+IPD,956:<!DOCTYPE html>
<html dir="ltr" lang="en-gb">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2014 TheMindFactory 2014 ESP8266.com" />
<meta name="keywords" content="ESP8266,wifi module,arudino,sdk,iot,wifi,compiler,support" />
<meta name="description" content="Open Community Forum for ESP8266, Worldwide 24/7 Support" />

<title>ESP8266 Community Forum &bull; View topic - Connect to web page</title>

<link rel="alternate" type="application/atom+xml" title="Feed - ESP8266 Community Forum" href="http://www.esp8266.com/feed.php" /><link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="ht
OK

+IPD,956:tp://www.esp8266.com/feed.php?mode=topics" /><link rel="alternate" type="application/atom+xml" title="Feed - Active Topics" href="http://www.esp8266.com/feed.php?mode=topics_active" /><link rel="alternate" type="application/atom+xml" title="Feed - Forum - General Discussions" href="http://www.esp8266.com/feed.php?f=6" /><link rel="alternate" type="application/atom+xml" title="Feed - Topic - Connect to web page" href="http://www.esp8266.com/feed.php?f=6&amp;t=338" />

<link href="./style.php?id=2&amp;lang=en&amp;sid=5c224d92ad24t" type="text/css" />

<!--
   phpBB style name:    Artodia Air
   Based on style:      prosilver (this is the default phpBB3 style)
   Prosilver author:    Tom Beddard ( http://www.subBlue.com/ )
   Air author:          Vjacheslav Trushkin ( http://www.artodia.com/ )
-->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r]
OK

+IPD,956:.q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-9091077-4', 'auto');
  ga('send', 'pageview');

</script>
<script type="text/javascript">
// <![CDATA[
   var jump_page = 'Enter the page number you wish to go to:';
   var on_page = '1';
   var per_page = '';
   var base_url = '';
   var style_cookie = 'phpBBstyle';
   var style_cookie_settings = '; path=/; domain=esp8266.com';
   var onload_functions = new Array();
   var onunload_functions = new Array();

   

   /**
   * Find a member
   */
   function find_username(url)
   {
      popup(url, 760, 570, '_usersearch');
      return false;
   }

   /**
   * New function for handling multiple calls to window.onload and window.unload by pentapenguin
   */
   window.onload = function()
   {
      for (var i = 0; i <
OK

+IPD,956:onload_functions.length; i++)
      {
         eval(onload_functions[i]);
      }
   };

   window.onunload = function()
   {
      for (var i = 0; i < onunload_functions.length; i++)
      {
         eval(onunload_functions[i]);
      }
   };
   
   /*
       Style specific stuff
    */
   var laSearchMini = 'Search…';
    var imagesetLang = './styles/art_air/imageset/en';
// ]]>
</script>
<!--[if lt IE 9]>
   <script type="text/javascript" src="./styles/art_air/template/jquery-1.10.2.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
   <script type="text/javascript" src="./styles/art_air/template/jquery-2.0.3.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8]><script type="text/javascript"> var oldIE = true; </script><![endif]-->
<script type="text/javascript" src="./styles/art_air/template/style.js"></script>
<script type="text/javascript" src="./styles/art_air/template/forum_fn.js"></script>

<!-- Go to www.addthis.com/dashboard to customize your too
OK

+IPD,956:ls -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=themindfactory"></script>
</head>

<body id="phpbb" class="section-viewtopic ltr">

<div id="header">
    <a href="./index.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="Board index" id="logo"><img src="./styles/art_air/imageset/logo.png" alt="" title="" /></a>
    <h1>ESP8266 Community Forum</h1>
    <p>Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)</p>
</div>

<div id="page-header" class="responsive-menu-nojs">
   <div class="menu-buttons responsive-menu" style="display:none;">
      <a href="javascript:void(0);"><span class="arrow">&darr;&darr;&darr;</span></a>
   </div>

    <div id="nav-header" class="menu-buttons">
       
        <a href="./faq.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="Frequently Asked Questions"><span>FAQ</span></a>
        <a href="./ucp.php?mode=register&amp;sid=5c224d9
OK

+IPD,956:2ad24c0aca5a2ddb4eb6a917a"><span>Register</span></a>
             <a href="./ucp.php?mode=login&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="Login" accesskey="x"><span>Login</span></a>
       
        <a href="javascript:void(0);" class="responsive-menu-hide" style="display:none;"><span>X</span></a>
    </div>

   
        <div id="search-adv">
            <a href="./search.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="View the advanced search options"><span>Advanced search</span></a>
        </div>
   
        <div id="search-box">
            <form action="./search.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" method="get" id="search">
                <input name="keywords" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search…" />
                <input type="hidden" name="sid" value="5c224d92ad24c0aca5a2ddb4eb6a917a" />

            </form>
        </div>
   
OK

+IPD,956:
</div>

<div id="page-body">
 
<div><br>
<a href="http://www.esp8266.com/ucp.php?mode=register">Register</a> now to recieve automatic updates from esp8266.com,<br> keep upto date with email alerts direct to your inbox,<br>
select what forums/threads you are interested in once you have signed in.<br><br></div><div>Registering also allows you to track what messages are new<br>and which are old, so you do not have to re-read everything.<br><br></div>
    <div class="nav-extra">
        <a href="./viewtopic.php?f=6&amp;t=338&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a&amp;view=print" title="Print view" accesskey="p">Print view</a>
    </div>

    <div class="nav-links">
        <a href="./index.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" accesskey="h"><span>Board index</span></a>
        <a href="./viewforum.php?f=6&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a"><span>General Discussions</span></a>
    </div>
   
   
<h2><a href="./vi
OK

+IPD,956:ewtopic.php?f=6&amp;t=338&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">Connect to web page</a></h2>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body --><div style="display: none !important;">Chat freely about anything here as long as its ESP8266 related. Spam will be deleted.<br /></div>

<div class="topic-actions">

   <div class="buttons">
   
      <div class="reply-icon"><a href="./posting.php?mode=reply&amp;f=6&amp;t=338&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="Post a reply"><span></span>Post a reply</a></div>
   
   </div>

   
      <div class="search-box">
         <form method="get" id="topic-search" action="./search.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a">
         <fieldset>
            <input class="inputbox search tiny"  type="text" name="keywords" id="search_keywords" size="20" value="Search this topic…" onclick="if(this.value=='Search this topic…')this.value='';" onblur="if(this.value=='')this.valu
OK

+IPD,956:e='Search this topic…';" />
            <input class="button2" type="submit" value="Search" />
            <input type="hidden" name="t" value="338" />
<input type="hidden" name="sf" value="msgonly" />
<input type="hidden" name="sid" value="5c224d92ad24c0aca5a2ddb4eb6a917a" />

         </fieldset>
         </form>
      </div>
   
      <div class="pagination">
         4 posts
          &bull; Page <strong>1</strong> of <strong>1</strong>
      </div>
   

</div>
<div class="clear"></div>


   <div id="p1553" class="post bg2">
      <div class="inner"><span class="corners-top"><span></span></span>

      <div class="postbody">
         

         <h3 class="first"><a href="#p1553">Connect to web page</a></h3>
         <p class="author"><a href="./viewtopic.php?p=1553&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a#p1553"><img src="./styles/art_air/imageset/icon_topic_latest.png" width="11" height="9" alt="Post" title="Post" /></a>by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=335&amp;sid=5c224d92ad24c0aca5a2ddb4eb6
OK

+IPD,956:a917a">tilz0R</a></strong> &raquo; Sun Oct 12, 2014 5:54 pm </p>

         

         <div class="content">Hi community.<br /><br />I have a simple question.<br />How to connect with this module to specific web page?<br /><br />I had successfully connected device to Wifi.<br /><br />Let's say I want to connect to this forum and get it's data back.<br />I have to connect to IP, that this forum is hosted on (70.38.12.79), but if I connect to this IP directly, I will not get esp8266.com forum but first page from forum host.<br /><br />And now, how can I connect to esp8266.com, not to server's home page?<br /><br />I'm successfully linked with TCP to 70.38.12.79 but when I received data, i got them from server's first page, not from esp8266.<br /><br />How next?<br /><br />Thanks for answers.</div>

         

      </div>

      
         <dl class="postprofile" id="profile1553">
OK

+IPD,956:b6a917a">tilz0R</a>
         </dt>

         

      <dd>&nbsp;</dd>

      <dd><strong>Posts:</strong> 2</dd><dd><strong>Joined:</strong> Thu Sep 18, 2014 6:12 pm</dd>

      </dl>
   

      <div class="back2top"><a href="#page-body" class="top" title="Top">Top</a></div>

      <span class="corners-bottom"><span></span></span></div>
   </div>

   <hr class="divider" />

   <div id="p1580" class="post bg1">
      <div class="inner"><span class="corners-top"><span></span></span>

      <div class="postbody">
         

         <h3 ><a href="#p1580">Re: Connect to web page</a></h3>
         <p class="author"><a href="./viewtopic.php?p=1580&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a#p1580"><img src="./styles/art_air/imageset/icon_topic_latest.png" width="11" height="9" alt="Post" title="Post" /></a>by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">gbit</a></strong> &raquo; Mon Oct 13, 2014 5:37 pm </p>

         

         <div class="content">Presumably you now need
OK

+Ie minimal http protocol client.  There are many versions of this on the web.  Using the protocol you provide the URL you're requesting, and that tells the server you want <!-- w --><a class="postlink" href="http://www.esp8266.com">www.esp8266.com</a><!-- w --> and not some other website (a single server can host many sites that way).</div>

         

      </div>

      
         <dl class="postprofile" id="profile1580">a href="./memberlist.php?mode=viewprofile&amp;u=111&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">gbit</a>
         </dt>

         

      <dd>&nbsp;</dd>

      <dd><strong>Posts:</strong> 4</dd><dd><strong>Joined:</strong> Tue Sep 02, 2014 8:44 pm</dd>

      </dl>
   

      <div class="back2top"><a href="#page-body" class="top" title="Top">Top</a></div>

      <span class="corners-bottom"><span></span></span></div>
   </div>

   <hr class="divider" />

   <div id="p1608" class="post bg2">
      <div class="inner"><span class="corners-top"><span></span></spa
OK

+IPD,956:n>

      <div class="postbody">
         

         <h3 ><a href="#p1608">Re: Connect to web page</a></h3>
         <p class="author"><a href="./viewtopic.php?p=1608&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a#p1608"><img src="./styles/art_air/imageset/icon_topic_latest.png" width="11" height="9" alt="Post" title="Post" /></a>by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=335&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">tilz0R</a></strong> &raquo; Tue Oct 14, 2014 6:22 am </p>

         

         <div class="content">How can I do that?<br /><br />Do irmware for ESP?</div>

         

      </div>

      
         <dl class="postprofile" id="profile1608">
         <dt>
            <a href="./memberlist.php?mode=viewprofile&amp;u=335&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">tilz0R</a>
         </dt>

         

      <dd>&nbsp;</dd>

      <dd><strong>Posts:</strong> 2</dd><dd><strong>Joined:</strong> Thu Sep 18, 2014 6:12 pm</dd>

      </dl>
   

      <div class="back2top"><a href="#page-body" class="to
OK

+IPD,956:p" title="Top">Top</a></div>

      <span class="corners-bottom"><span></span></span></div>
   </div>

   <hr class="divider" />

   <div id="p1609" class="post bg1">
      <div class="inner"><span class="corners-top"><span></span></span>

      <div class="postbody">
         

         <h3 ><a href="#p1609">Re: Connect to web page</a></h3>
         <p class="author"><a href="./viewtopic.php?p=1609&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a#p1609"><img src="./styles/art_air/imageset/icon_topic_latest.png" width="11" height="9" alt="Post" title="Post" /></a>by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=104&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">villTech</a></strong> &raquo; Tue Oct 14, 2014 6:47 am </p>

         

         <div class="content">you dont need a fw for that.<br /commands.</div>

         

      </div>

      
         <dl class="postprofile" id="profile1609">
         <dt>
            <a href="./memberlist.php?mode=viewprofile&amp;u=104&amp;sid=5c224d92ad24c0aca5a2dd
OK

+IPD,956:b4eb6a917a">villTech</a>
         </dt>

         

      <dd>&nbsp;</dd>

      <dd><strong>Posts:</strong> 17</dd><dd><strong>Joined:</strong> Tue Sep 02, 2014 7:46 am</dd>

      </dl>
   

      <div class="back2top"><a href="#page-body" class="top" title="Top">Top</a></div>

      <span class="corners-bottom"><span></span></span></div>
   </div>

   <hr class="divider" />

   <form id="viewtopic" method="post" action="./viewtopic.php?f=6&amp;t=338&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">

   <fieldset class="display-options" style="margin-top: 0; ">
      
      <label>Display posts from previous: <select name="st" id="st"><option value="0" selected="selected">All posts</option><option value="1">1 day</option><option value="7">7 days</option><option value="14">2 weeks</option><option value="30">1 month</option><option value="90">3 months</option><option value="180">6 months</option><option value="365">1 year</option></select></label>
      <label>Sort by <select name="sk" id="sk"><option
OK

+IPD,956:value="a">Author</option><option value="t" selected="selected">Post time</option><option value="s">Subject</option></select></label> <label><select name="sd" id="sd"><option value="a" selected="selected">Ascending</option><option value="d">Descending</option></select> <input type="submit" name="sort" value="Go" class="button2" /></label>
      
   </fieldset>

   </form>
   <hr />


<div class="topic-actions">ns">
   
      <div class="reply-icon"><a href="./posting.php?mode=reply&amp;f=6&amp;t=338&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a" title="Post a reply"><span></span>Post a reply</a></div>
   
   </div>

   
      <div class="pagination">
         4 posts
          &bull; Page <strong>1</strong> of <strong>1</strong>
      </div>
   
</div>


   <p></p><p><a href="./viewforum.php?f=6&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a" class="left-box left" accesskey="r">Return to General Discussions</a></p>

   <form method="post" id="jumpbox" action="./viewforum.php?sid=5c2
OK

+IPD,956:24d92ad24c0aca5a2ddb4eb6a917a" onsubmit="if(this.f.value == -1){return false;}">

   
      <fieldset class="jumpbox">
   
         <label for="f" accesskey="j">Jump to:</label>
         <select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
         
            <option value="-1">Select a forum</option>
         <option value="-1">------------------</option>
            <option value="4">Welcome</option>
         
            <option value="5">Documentation</option>
         
            <option value="9">Compiler Chat</option>
         
            <option value="13">Hardware Specific</option>
         
            <option value="6" selected="selected">General Discussions</option>
         
            <option value="10">Projects</option>
         
            <option value="11">&nbsp; &nbsp;Sample Project</option>
         
            <option value="14">&nbsp; &nbsp;Community Project to fix AT+ Commands</option>
         
            <option value="7">Platforms</option>
         
            <option value="8">&nbsp; &nbsp;Arduino</option>
      
OK

+IPD,956:   
            <option value="12">&nbsp; &nbsp;IoT (Internet of Things)</option>
         
         </select>
         <input type="submit" value="Go" class="button2" />
      </fieldset>
   </form>


   <h3>Who is online</h3>
   <p>Users browsing this forum: No registered users and 2 guests</p>
<div class="nav-extra nav-extra-footer">
        <a href="./memberlist.php?mode=leaders&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">The team</a> &bull; <a href="./ucp.php?mode=delete_cookies&amp;sid=5c224d92ad24c0aca5a2ddb4eb6a917a">Delete all board cookies</a> &bull;
        <span class="time">All times are UTC - 5 hours [ <abbr title="Daylight Saving Time">DST</abbr> ]</span>
    </div>
   <div class="nav-links nav-links-footer">
      <a href="./index.php?sid=5c224d92ad24c0aca5a2ddb4eb6a917a" accesskey="h"><span>Board index</span></a>
       
   </div>
   
</div>

<div id="footer">

   <div class="copyright">
      
       <p class="copy-left">
           Powered by <a href="http://www.ph
OK

+IPD,344:pbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
          
      </p>
<!--
    Please do not remove style author's link below. For updates and support visit http://www.artodia.com/
//-->
      <p class="copy-right">
          Style designed by <a href="http://www.artodia.com/">Artodia</a>.
        </p>
   </div>
   
</div>
</body>
</html>
OK

OK
Unlink