Dynamic HTTP Link on TCPNET Web Server

Hi,
in my web server application i need to have multiply html pages for ad.cgi.
but i can't prediction number of sub pages so i cant't copy & paste base ad.cgi page with different names and put them on Web static file.

my prefer links is something like this :

192.168.0.10/ad.cgi?p=1 .... 192.168.0.10/ad.cgi?p=100

how i can implement this method of dynamic HTTP link ?
can i process parameters on http page requests?

Parents
  • Your approach means, your embedded web server should make up an entire web page, specified by the URI, on its RAM.

    You would better to learn JavaScript to make the contents of your web pages dynamic, instead of "Dynamic HTTP Link".

    1) First, your embedded server provides a template web page and script(s) to a PC browser.
    2) On the PC browser, using XMLHttpRequest, the script retrieves values/strings from your embedded server over CGI.
    3) The script fills the template page with these values/strings, and show it up on the PC browser as a web page.

    That is, the web page is made up on the PC browser side, by communicating with your embedded server. This approach makes your embedded server simple. Also, even an 8bit MCU with small RAM size may serve.

    I wrote about this approach a little more detailed on this SiLabs topic,
    community.silabs.com/.../18665

    Tsuneo

Reply
  • Your approach means, your embedded web server should make up an entire web page, specified by the URI, on its RAM.

    You would better to learn JavaScript to make the contents of your web pages dynamic, instead of "Dynamic HTTP Link".

    1) First, your embedded server provides a template web page and script(s) to a PC browser.
    2) On the PC browser, using XMLHttpRequest, the script retrieves values/strings from your embedded server over CGI.
    3) The script fills the template page with these values/strings, and show it up on the PC browser as a web page.

    That is, the web page is made up on the PC browser side, by communicating with your embedded server. This approach makes your embedded server simple. Also, even an 8bit MCU with small RAM size may serve.

    I wrote about this approach a little more detailed on this SiLabs topic,
    community.silabs.com/.../18665

    Tsuneo

Children
More questions in this forum