Shop OBEX P1 Docs P2 Docs Learn Events
Trouble getting W5200 connected , Solved , DHCP+Netbios+Basic Auth+Multisocketserver - Page 8 — Parallax Forums

Trouble getting W5200 connected , Solved , DHCP+Netbios+Basic Auth+Multisocketserver

1234568»

Comments

  • Mike GMike G Posts: 2,702
    edited 2012-11-09 04:59
    1) Make sure you know the URL that retrieves the temperature reading from the Prop/W5200. Enter the URL in the browser address bar and press enter.
    http://192.168.1.104:8080/xmltemp
    

    You should see the XML document.

    2) Copy the URL into the proxy page. If the web pages are coming from a server on the internet then you'll have to use the IP assigned by your ISP and configure your router to port forward requests. See this post too

    [php]
    <?php
    $url = "http://192.168.1.104:8080/xmltemp";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_exec($ch);
    if(!curl_errno($ch))
    {
    //Content type should be XML
    header ('Content-type: text/xml');
    }
    else
    {
    echo 'Curl error: ' . curl_error($ch);
    }
    curl_close($ch);
    ?>
    [/php]

    3) Copy the updated proxy page to your web server.

    4) Enter the newly create proxy address in the browser address bar and press enter. You should see the same XML as step 1.

    5) Update the setInterval() method in the index.htm page with the proxy URL in step 4 and upload index.htm to your web server.
      setInterval("getRequest('graphproxy.php')", 500);
    
Sign In or Register to comment.