客户发过来一个连接,带有一些参数我现在想根据这些参数,算出另外一个链接,应该怎么做?网页?cgi?请指教

解决方案 »

  1.   

    use javascript to do it in your cgi.see my example:
    int CgiTopJump(char *pszUrl)
    {
        printf("Content-type: text/html\n\n");
        printf("<html>\n");
        printf("<head>\n");
        printf("</head><body>\n");
        printf("<script LANGUAGE=\"JavaScript\">\n");
        printf("top.window.location='%s';\n", pszUrl);
        printf("</script>\n");
        printf("</body></html>\n");    fflush(stdout);    return E_OK;
    }
      

  2.   

    用30x的redirect返回值
    最好用临时重定向
      

  3.   

    thank
    能不能说详细一点,我对cgi不熟啊
      

  4.   

    你是自己写服务器还是做c-cgi?
      

  5.   

    不一定要cgi,我要一个可行的方法客户端传过来一个get报文,带有几个参数
    服务端通过这些参数,算出一个链接,再告诉客户端去这个链接下东西要求就这么一些,感觉很多方法能实现cgi,isapi,jsp...但是具体的,又没什么头绪哪位大侠指点一下
      

  6.   

    反正就是使用HTTP_REDIRECT方法,根据你使用的具体语言参考文档吧