<div class="se-component se-sectionTitle se-l-default" id="SE-06558068-cbd9-4d73-9fd9-27fa26f55be7" style="margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: 16.002px; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif; vertical-align: baseline; position: relative; background-color: #ffffff;">
   <div class="se-component-content" style="margin: 0px auto; padding: 0px 20px; border: 0px; font: inherit; vertical-align: baseline; max-width: 640px;">
      <div class="se-section se-section-sectionTitle se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
         <div class="se-module se-module-text" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
            <div class="se-component se-text se-l-default" id="SE-6dcd96bc-74b5-43e2-8da4-761b394034bc" style="margin: 10px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-text se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                     <div class="se-module se-module-text" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-4a2b2c0a-1a64-4037-b32c-a3c8ac992062" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-4db43f09-e77d-45b9-ae3d-990e48522ee6" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">ESP8266 은 아두이노에서 가장 많이 사용되는 Wi-Fi 칩입니다. 서버로써 사용할 수도, 클라이언트로 사용할 수도 있습니다.</span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-afd18c43-953a-47c4-8c87-a7110ab2d42b" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-8448a876-237a-423c-80a7-b68e0559ac5a" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-d5bb2967-0fbd-48ca-91e1-f17689340bcc" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-e539fbbf-f85a-42ce-af09-804ac71c71c5" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">이번에는 클라이언트로 사용했으며, PHP 와 연동하여 사용하던 중 문제를 발견하였습니다. 바로 세션 기능이 동작하지 않았던 것이지요. </span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-cecf60ae-f76f-4533-a585-8f5a984a4dcf" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-9405652b-d155-4f5e-9752-1620471fdfcd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-9f8ed2c3-e505-4823-8b5b-3281abc3ae2a" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-0b003201-a95e-45e3-bd7c-134319adf4fd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">아래는 간단한 클라이언트 예제입니다. 단순히 특정 주소로 GET 을 보내고 응답을 받아옵니다.</span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-4ae3437f-8374-4bf3-b67a-a0f955fdc5f9" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-85996d08-f966-43ea-b2f1-ab38f864c391" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-e31d2c8c-a23d-4c85-a5cb-3b8fcb0d4867" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-55c65a10-7269-42ab-9b57-8c7bf4ea4dbb" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"><a href="https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino" class="se-link" target="_blank" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; text-decoration-skip-ink: none; word-break: break-all; color: #608cba !important;">https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino</a></span></p>
                        </div>
                     </div>
                  </div>
               </div>
            <div class="se-component se-oglink se-l-image __se-component" id="SE-85953b60-16e8-4693-a168-495fbaa3c0fa" style="margin: 30px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-oglink se-l-image se-section-align-" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; width: 450px; max-width: 450px;">
                     <div class="se-module se-module-oglink" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; position: relative; width: 450px; box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 2px 0px; cursor: pointer;"><a href="https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino" class="se-oglink-thumbnail" target="_blank" style="text-decoration-line: none; margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; display: block; position: relative; z-index: 1; width: 110px;"><img src="https://dthumb-phinf.pstatic.net/?src=%22https%3A%2F%2Favatars0.githubusercontent.com%2Fu%2F8943775%3Fs%3D400%26v%3D4%22&amp;type=ff120" class="se-oglink-thumbnail-resource egjs-visible" alt="" style="border: 0px; margin: 0px; padding: 0px; font: inherit; vertical-align: top; width: 110px; height: auto; min-height: 110px;" /></a><a href="https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino" class="se-oglink-info" target="_blank" style="text-decoration-line: none; margin: 0px; padding: 21px 26px 18px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.4; font-family: inherit; vertical-align: baseline; position: absolute; display: block; box-sizing: border-box; inset: 0px 0px 0px 110px;">&nbsp;
                           <div class="se-oglink-info-container" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: middle; display: inline-block; max-width: 100%;"><span class="se-oglink-title" style="white-space: nowrap; overflow-wrap: normal; overflow: hidden; text-overflow: ellipsis; word-break: break-all; display: block; line-height: 15px; font-weight: 700; color: #333333; font-size: 15px;">esp8266/Arduino</span>
                              <p class="se-oglink-summary" style="margin-top: 7px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 13px; line-height: 18px; font-family: inherit; vertical-align: baseline; white-space: nowrap; overflow-wrap: normal; overflow: hidden; text-overflow: ellipsis; word-break: break-all; color: #999999;">ESP8266 core for Arduino. Contribute to esp8266/Arduino development by creating an account on GitHub.</p>
                              <p class="se-oglink-url" style="margin-top: 9px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 13px; line-height: 15px; font-family: inherit; vertical-align: baseline; white-space: nowrap; overflow-wrap: normal; overflow: hidden; text-overflow: ellipsis; word-break: break-all; color: #00a832;">github.com</p>
                              </div>
                           </a></div>
                     </div>
                  </div>
               </div>
            <div class="se-component se-text se-l-default" id="SE-d6395af0-837a-4b5c-ac41-f6c0e243b637" style="margin: 30px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-text se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                     <div class="se-module se-module-text" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-593fe019-e10e-4f09-9d19-753ed205f636" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-a274a3dc-9f16-454c-8734-dc789d27c0b3" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">위에 설명한 것처럼 세션 기능은 동작하지 않습니다. 어떤 이유에서 동작하지 않는지, 무엇이 더 필요한지, 세션이 어떤 방식으로 동작하는지 공부와 연구를 하였고 결국 해결할 수 있었습니다.</span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-2a1948a7-3746-4287-8278-acfc4c1a9a61" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-345f7c34-a081-437d-8aff-1606e5324298" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-18fba03e-a8b4-44dd-a965-1a7e36c7748e" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-d0efa59e-2394-4432-96a2-ed17193e3e05" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">우선 세션을 유지하기 위해 쿠키를 사용합니다. PHPSESSID 라는 이름의 26자리 문자열의 키값이며, 최초 PHP 서버에서 보내줍니다. 그 키값을 받아서 다음 요청 시에 쿠키를 통해 보내주면, 이전 세션을 기억하는 원리로 동작합니다. 웹 브라우저에서는 이 동작을 자동으로 처리해주므로 우리가 전혀 신경 쓰지 못했던 것입니다. 길게 설명하는 것보다 아래의 소스를 보면 더 쉽게 이해가 될 겁니다.</span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-cfea6fdb-d36c-4e0a-81df-084044050cc6" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-5bb92d9c-e41e-4d46-8d39-b93eb442aa90" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-abfe9240-bbfd-410c-9be6-7bcded5a6f7a" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-a112b22a-4bbb-48b5-976e-f79c1e3d27c5" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-56fe6467-f105-4905-9655-242ca2da7d53" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-49fb5ece-3f81-44ae-8f80-99f42f270eb5" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;"></span></p>
                        </div>
                     </div>
                  </div>
               </div>
            <div class="se-component se-sectionTitle se-l-default" id="SE-c7cec33f-9d5f-47c0-929d-15163ad6b25d" style="margin: 10px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-sectionTitle se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                     <div class="se-module se-module-text" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-a0b2c389-71d5-4d37-8d9e-eeaf77263c80" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.5; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-4eb65703-fb52-4bdd-aa5b-5d982c299fc2" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 30px; line-height: inherit; vertical-align: baseline;">아두이노 소스</span></p>
                        </div>
                     </div>
                  </div>
               </div>
            <div class="se-component se-text se-l-default" id="SE-efa65617-5500-466b-9a1e-a947a67aa54c" style="margin: 10px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-text se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                     <div class="se-module se-module-text" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-ac0d175e-e77f-4314-80f7-2f9b7b34d18a" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-0c7e4e73-64e0-4d16-bf9b-68205027c52b" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">간단히 GET 요청을 약 0.5초 간격으로 5번 보내고 무한 대기하는 동작을 합니다.</span></p>
                        <p class="se-text-paragraph se-text-paragraph-align- " id="SE-56e65ad1-3a32-43de-97b3-92119141506e" style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 0px; line-height: 1.8; font-family: inherit; vertical-align: baseline; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap;"><span class="se-fs- se-ff-   " id="SE-4deafeb7-f05a-4322-a4e6-bd1b3c735539" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline;">당연하지만 SSID 와 패스워드, PHP 서버의 주소는 수정해야 합니다.</span></p>
                        </div>
                     </div>
                  </div>
               </div>
            <div class="se-component se-code se-l-default __se-component" id="SE-a5caacc2-eb18-457c-991c-75c2f0f160a4" style="margin: 30px 0px 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: medium; line-height: inherit; font-family: se-nanumgothic, &quot;\\B098눔고딕&quot;, nanumgothic, sans-serif, Meiryo; vertical-align: baseline; position: relative;">
               <div class="se-component-content" style="margin: 0px auto; padding: 0px 40px; border: 0px; font: inherit; vertical-align: baseline; max-width: 100%;">
                  <div class="se-section se-section-code se-l-default" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; position: relative; background-color: #fdfdfd;">
                     <div class="se-module se-module-code se-fs-fs13" style="margin: 0px; padding: 12px 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 13px; line-height: inherit; font-family: inherit; vertical-align: baseline; overflow: auto hidden;">
                        <div class="se-code-source" style="margin: 0px; padding: 0px 17px; border: 0px; font: inherit; vertical-align: baseline; display: inline-block;">
                           <div class="__se_code_view  language-javascript" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: 24px; font-family: &quot;Source Code Pro&quot;, sourcecodepro, se-sourcecodepro, Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace, sans-serif; vertical-align: baseline; background: none; white-space: pre; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none;">
#include <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&lt;</span>ESP8266WiFi<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span>h<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;</span>
#include <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&lt;</span>ESP8266HTTPClient<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span>h<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;</span>
#include <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&lt;</span>WiFiClient<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span>h<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;</span>
#include <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&lt;</span>ESP8266WiFiMulti<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span>h<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;</span>
ESP8266WiFiMulti WiFiMulti<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
HTTPClient http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">const</span> char<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">*</span> ssid <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"ssid"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">const</span> char<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">*</span> password <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"password"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">const</span> char<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">*</span> szURL <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"http://php_url_what_you_want"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
unsigned long previousMillis <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">0</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
String strPHPSESSID<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
int iWorkCount <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">0</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
String <span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">httpGETRequest</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">const</span> char<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">*</span> serverName<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">void</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">setup</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
  Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">begin</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">115200</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  WiFi<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">mode</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-constant" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">WIFI_STA</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  WiFiMulti<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">addAP</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>ssid<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">,</span> password<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">while</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>WiFiMulti<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">run</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">!=</span><span class="token se-code-constant" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">WL_CONNECTED</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">delay</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">500</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
    Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">print</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"."</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span>
  Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">""</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"Connected to WiFi"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">setReuse</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-boolean" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">true</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">void</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">loop</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">if</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">millis</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">-</span> previousMillis <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;=</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">500</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">if</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>WiFiMulti<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">run</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">==</span><span class="token se-code-constant" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">WL_CONNECTED</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
      String res <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">httpGETRequest</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>szURL<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
      Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">print</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"Result: "</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
      Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>res<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-comment" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #708091;">// save the last HTTP GET Request</span>
      iWorkCount<span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">++</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">if</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>iWorkCount <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;=</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">5</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
        Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"Work done!!"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">while</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">1</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">yield</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">else</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
      Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"WiFi Disconnected"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span>
    previousMillis <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">millis</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span>
String <span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">httpGETRequest</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-parameter" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">const char* serverName</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
  WiFiClient client<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">begin</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>client<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">,</span> serverName<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">if</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>strPHPSESSID<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">length</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">&gt;</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">0</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span>
    Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">print</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"send PHPSESSID: "</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
    Serial<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">println</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>strPHPSESSID<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
    http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">addHeader</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"Cookie"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">,</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"PHPSESSID="</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">+</span> strPHPSESSID<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-keyword" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #137fb7;">const</span> char <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">*</span>keys<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">[</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">]</span><span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">{</span><span class="token se-code-string" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #60911b;">"Set-Cookie"</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">}</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-function" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #df4a68;">collectHeaders</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span>keys<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">,</span><span class="token se-code-number" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">1</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  int httpResponseCode <span class="token se-code-operator" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #a77f71;">=</span> http<span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">.</span><span class="token se-code-constant" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #e57523;">GET</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">(</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">)</span><span class="token se-code-punctuation" style="margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline; color: #666666;">;</span>
  String strResult <span class="token se-code-operator" styl