donghaima你能把程序法我一份吗?谢谢
[email protected]

解决方案 »

  1.   

    to donghaima:给我email一份好吗
    [email protected]
    谢谢!
      

  2.   

    donghaima:  可否也mail一份给我. 
      非常感谢!      
      [email protected]
      

  3.   

    donghaima:
       能否把你的程序发给我一份,多谢了。
      

  4.   

    donghaima:把你的程序发一份给我好吗?多谢!
              [email protected]
      

  5.   

    我的妈呀,我发了这么多邮件, 
    再把源程序贴在下面,
    我也需要懂得CGI的人帮助.
    #include<windows.h>
    #include<wininet.h>
    #define HTTP "WWW.UNIPAGING.NET"//////////////////////////////////////////////////////////////////
    //
    //  全局变量
    //
    CHAR * cMsg="stn_id=191&page_no=呼机号&pager_type=C&firstname=马东海&"
                "title=0&msg=源程序已经贴出,THANKS\r\n&answer=null&B1=XYZ";
    CHAR cBuff[10];
    DWORD Buff;
    DWORD LenBuff=4;//////////////////////////////////////////////////////////////////
    //
    //  主线
    //
    int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
     LPSTR lpCmdLine,int nCmdShow)
    {
    HINTERNET hINTERSetup;
    HINTERNET hINTERConnect;
    HINTERNET hHTTPOpenRequ;    /*初始化INTERNET,NULL失败*/
        if((hINTERSetup=InternetOpen("BP",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0))==NULL)
    return FALSE;    /*建立实际的HTTP连接,NULL失败*/
        if((hINTERConnect=InternetConnect(hINTERSetup,
                  HTTP,
                          INTERNET_DEFAULT_HTTP_PORT,
                          NULL,                         
                          NULL,
                          INTERNET_SERVICE_HTTP,
                          INTERNET_FLAG_PASSIVE,
                          0))==NULL)
    {
    InternetCloseHandle(hINTERSetup);
    return FALSE;
    }    if((hHTTPOpenRequ=HttpOpenRequest(hINTERConnect,
                  "POST",
      "/cgi-bin/tips/webpaging",
      NULL,
      HTTP,
      NULL,
      INTERNET_FLAG_EXISTING_CONNECT,
      1))==NULL)
    {
    InternetCloseHandle(hINTERConnect);
        InternetCloseHandle(hINTERSetup);
    MessageBox(NULL,"HttpOpenRequest","ERROR",MB_OK);
    return FALSE;
    } if(!HttpSendRequest(hHTTPOpenRequ,NULL,0,cMsg,strlen(cMsg)))
    {
    InternetCloseHandle(hHTTPOpenRequ);
    InternetCloseHandle(hINTERConnect);
    InternetCloseHandle(hINTERSetup);
    MessageBox(NULL,"HttpSendRequest","ERROR",MB_OK);
    return FALSE;
    } if(!HttpQueryInfo(hHTTPOpenRequ,
                  HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER,
                  &Buff,&LenBuff,NULL))
    {
    InternetCloseHandle(hHTTPOpenRequ);
    InternetCloseHandle(hINTERConnect);
    InternetCloseHandle(hINTERSetup);
        MessageBox(NULL,"HttpQueryInfo","ERROR",MB_OK);
    return FALSE;
    } wsprintf(cBuff,"%d",Buff);
    MessageBox(NULL,cBuff,"INFORMATION",MB_OK);
    /*关闭HTTP连接*/
    InternetCloseHandle(hHTTPOpenRequ);
    InternetCloseHandle(hINTERConnect);
    InternetCloseHandle(hINTERSetup);
    return 0;
    }
      

  6.   

    谢谢donghaima,我还有一个问题想请教:给BP机发消息和给手机发短消息有什么区别?
      

  7.   

    哪有这么复杂?!还要自己写一个InternetConnect,这样太依赖MFC了,
    你只要知道http协议的格式,直接组成自己想要的字符流,通过socket丢上去,就可以骗上端服务器了,管它是cgi,isapi,还是asp!!!!
    我有源代码。
      

  8.   

    to pipu
    能把你的源代码给我邮一份么
    [email protected]