Thread: Post...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Post...

    I know I can run php script by downloading it, but how can I send POST data with it. PHP is the best way to communicate with MySql, but I would like to send data to php scripts too, but GET isn't really good way to do this.

  2. #2
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    you may want to ask this in an HTML forum, you use HTML forms.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    you may want to ask this in an HTML forum, you use HTML forms.
    I am trying to send POST data to a PHP script in a C++ program!!!!

  4. #4
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    ok, I see what you are saying. Anyway, you can either use a library to do this, or take a look at the HTTP spec, it's not very hard to code your own HTTP posts, I've done it plenty of times before. Connect to port 80, send "POST /file HTTP/1.1" followed by headers such as "Content-Length: 34235", followed by a blank line, followed by the data which matches up with the size of your content length header.

  5. #5

  6. #6
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Thanks

  7. #7
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Errors
    Code:
    Kompilaator: Default compiler
    Building Makefile: "C:\Programs\Dev-Cpp\Makefile.win"
     make... käivitus
    make.exe -f "C:\Programs\Dev-Cpp\Makefile.win" all
    g++.exe -c Projects/generichttpclient.cpp -o Projects/generichttpclient.o -I"C:/PROGRAMS/DEV-CPP/lib/gcc/mingw32/3.4.2/include"  -I"C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/backward"  -I"C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32"  -I"C:/PROGRAMS/DEV-CPP/include/c++/3.4.2"  -I"C:/PROGRAMS/DEV-CPP/include"   
    
    In file included from C:/PROGRAMS/DEV-CPP/include/afxwin.h:19,
    
                     from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/afx.h:183: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
    
    C:/PROGRAMS/DEV-CPP/include/afx.h:1949: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)
    
    In file included from C:/PROGRAMS/DEV-CPP/include/afx.h:1953,
                     from C:/PROGRAMS/DEV-CPP/include/afxwin.h:19,
                     from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    
    C:/PROGRAMS/DEV-CPP/include/afxcoll.h:1007:1: unterminated #else
    C:/PROGRAMS/DEV-CPP/include/afxcoll.h:11:1: unterminated #ifndef
    In file included from C:/PROGRAMS/DEV-CPP/include/afxwin.h:19,
                     from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/afx.h:1955:74: afxstat_.h: No such file or directory
    C:/PROGRAMS/DEV-CPP/include/afx.h:1971:19: afx.inl: No such file or directory
    In file included from C:/PROGRAMS/DEV-CPP/include/afxwin.h:33,
                     from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/afxcoll.h:1007:1: unterminated #else
    C:/PROGRAMS/DEV-CPP/include/afxcoll.h:11:1: unterminated #ifndef
    In file included from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/afxwin.h:54: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
    
    In file included from Projects/GenericHTTPClient.h:19,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/afxwin.h:12:1: unterminated #ifndef
    C:/PROGRAMS/DEV-CPP/include/afxwin.h:11:1: unterminated #ifndef
    In file included from Projects/GenericHTTPClient.h:21,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/wininet.h:9: error: expected `;' before "extern"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:66,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/functexcept.h:36: error: expected `;' before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/functexcept.h:36: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:64,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++config.h:57: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++config.h:59: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstring:49,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:65,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstddef:50: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:65,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstring:77: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:67,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdlib:84: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdlib:140: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdlib:184: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/new:42,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:69,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/exception:40: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:69,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/new:44: error: expected unqualified-id before string constant
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/clocale:49,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++locale.h:41,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/locale.h:68: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++locale.h:41,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/clocale:55: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++locale.h:43,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:46,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdio:97: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdio:153: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cstdio:175: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++locale.h:47: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/gthr-default.h:66,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/gthr.h:96,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++io.h:37,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:47,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/errno.h:80: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/gthr.h:96,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++io.h:37,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:47,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/gthr-default.h:331: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:47,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++io.h:39: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cctype:49,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:48,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/ctype.h:43: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:48,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cctype:66: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:49,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stringfwd.h:46: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:51,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/postypes.h:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:50,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/ctime:64: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/wchar.h:45,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:54,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/postypes.h:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:50,
    
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/wctype.h:54: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:54,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/postypes.h:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:50,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/wchar.h:63: error: expected unqualified-id before string constant
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/postypes.h:46,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:50,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:69: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:141: error: expected unqualified-id before "namespace"
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:242: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cwchar:263: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:50,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/postypes.h:52: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:51,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/functexcept.h:36: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:70,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
    
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/iosfwd:53: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:71,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_pair.h:64: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:72,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:124: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:124: error: explicit specialization in non-namespace scope `class CBitmap'
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:134: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:134: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:144: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:144: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:154: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:154: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:164: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:164: error: explicit specialization in non-namespace scope `class CBitmap'
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:174: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:174: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:184: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:184: error: explicit specialization in non-namespace scope `class CBitmap'
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:194: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:194: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:204: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:204: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:214: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:214: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:224: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:224: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:234: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:234: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:244: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:244: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:254: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:254: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:264: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:264: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:274: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:274: error: explicit specialization in non-namespace scope `class CBitmap'
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:303: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:303: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:309: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:309: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:315: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:315: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:321: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:321: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:327: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:327: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:333: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:333: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:339: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:339: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:345: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:345: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:351: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:351: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:357: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:357: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:363: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:363: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:369: error: invalid explicit specialization before '>' token
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:369: error: explicit specialization in non-namespace scope `class CBitmap'
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:375: error: invalid explicit specialization before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:375: error: explicit specialization in non-namespace scope `class CBitmap'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:388: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:395: error: `__gnu_cxx' has not been declared
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:395: error: `__normal_iterator' was not declared in this scope
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:396: error: wrong number of template arguments (2, should be 1)
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:383: error: provided for `template<class _Tp> struct CBitmap::_Is_normal_iterator'
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:396: error: expected unqualified-id before '>' token
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/type_traits.h:396: error: expected `;' before '>' token
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:73,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_iterator_base_types.h:69: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:74,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_iterator_base_funcs.h:70: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:75,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_iterator.h:68: error: expected unqualified-id before "namespace"
    
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_iterator.h:574: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/cassert:48,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/debug/debug.h:272,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:77,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/assert.h:20: error: expected unqualified-id before string constant
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:77,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/debug/debug.h:278: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:67,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_algobase.h:79: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/mingw32/bits/c++allocator.h:34,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/allocator.h:52,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:68,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/ext/new_allocator.h:35: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:68,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/allocator.h:54: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:69,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_construct.h:67: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:70,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_uninitialized.h:66: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_vector.h:65,
                     from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:71,
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/functexcept.h:36: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:71,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_vector.h:68: error: expected unqualified-id before "namespace"
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:72,
    
                     from Projects/GenericHTTPClient.h:24,
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_bvector.h:64: error: expected unqualified-id before "namespace"
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/stl_bvector.h:394: error: expected unqualified-id before "namespace"
    
    In file included from C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/vector:75,
                     from Projects/GenericHTTPClient.h:24,
    
                     from Projects/generichttpclient.cpp:5:
    C:/PROGRAMS/DEV-CPP/include/c++/3.4.2/bits/vector.tcc:64: error: expected unqualified-id before "namespace"
    In file included from Projects/generichttpclient.cpp:5:
    Projects/GenericHTTPClient.h:50: error: ISO C++ forbids declaration of `operator==' with no type
    Projects/GenericHTTPClient.h:98: error: using-declaration for non-member at class scope
    Projects/GenericHTTPClient.h:98: error: expected `;' before '<' token
    Projects/GenericHTTPClient.h:103: error: `HINTERNET' does not name a type
    
    Projects/GenericHTTPClient.h:104: error: `HINTERNET' does not name a type
    
    Projects/GenericHTTPClient.h:105: error: `HINTERNET' does not name a type
    Projects/generichttpclient.cpp:8: error: cannot declare member function `CBitmap::GenericHTTPClient::GenericHTTPClient' within `CBitmap'
    Projects/generichttpclient.cpp:12: error: cannot declare member function `CBitmap::GenericHTTPClient::GenericHTTPClient' within `CBitmap'
    
    Projects/generichttpclient.cpp:16: error: cannot declare member function `CBitmap::GenericHTTPClient::GetMethod' within `CBitmap'
    Projects/generichttpclient.cpp:20: error: cannot declare member function `CBitmap::GenericHTTPClient::GetPostArgumentType' within `CBitmap'
    
    Projects/generichttpclient.cpp:24: error: cannot declare member function `CBitmap::GenericHTTPClient::Connect' within `CBitmap'
    Projects/generichttpclient.cpp:98: error: cannot declare member function `CBitmap::GenericHTTPClient::Close' within `CBitmap'
    
    Projects/generichttpclient.cpp:112: error: cannot declare member function `CBitmap::GenericHTTPClient::Request' within `CBitmap'
    Projects/generichttpclient.cpp:139: error: cannot declare member function `CBitmap::GenericHTTPClient::RequestOfURI' within `CBitmap'
    Projects/generichttpclient.cpp:169: error: cannot declare member function `CBitmap::GenericHTTPClient::RequestGet' within `CBitmap'
    Projects/generichttpclient.cpp:243: error: cannot declare member function `CBitmap::GenericHTTPClient::RequestPost' within `CBitmap'
    Projects/generichttpclient.cpp:322: error: cannot declare member function `CBitmap::GenericHTTPClient::RequestPostMultiPartsFormData' within `CBitmap'
    
    Projects/generichttpclient.cpp:499: error: cannot declare member function `CBitmap::GenericHTTPClient::ResponseOfBytes' within `CBitmap'
    
    Projects/generichttpclient.cpp:544: error: cannot declare member function `CBitmap::GenericHTTPClient::Response' within `CBitmap'
    Projects/generichttpclient.cpp:594: error: cannot declare member function `CBitmap::GenericHTTPClient::AddPostArguments' within `CBitmap'
    Projects/generichttpclient.cpp:612: error: cannot declare member function `CBitmap::GenericHTTPClient::AddPostArguments' within `CBitmap'
    Projects/generichttpclient.cpp:626: error: cannot declare member function `CBitmap::GenericHTTPClient::GetPostArguments' within `CBitmap'
    Projects/generichttpclient.cpp:647: error: cannot declare member function `CBitmap::GenericHTTPClient::InitilizePostArguments' within `CBitmap'
    Projects/generichttpclient.cpp:652: error: cannot declare member function `CBitmap::GenericHTTPClient::FreeMultiPartsFormData' within `CBitmap'
    Projects/generichttpclient.cpp:662: error: cannot declare member function `CBitmap::GenericHTTPClient::AllocMultiPartsFormData' within `CBitmap'
    Projects/generichttpclient.cpp:754: error: cannot declare member function `CBitmap::GenericHTTPClient::GetMultiPartsFormDataLength' within `CBitmap'
    Projects/generichttpclient.cpp:784: error: cannot declare member function `CBitmap::GenericHTTPClient::GetContentType' within `CBitmap'
    Projects/generichttpclient.cpp:809: error: cannot declare member function `CBitmap::GenericHTTPClient::GetLastError' within `CBitmap'
    Projects/generichttpclient.cpp:814: error: cannot declare member function `CBitmap::GenericHTTPClient::ParseURL' within `CBitmap'
    
    Projects/generichttpclient.cpp:879: error: cannot declare member function `CBitmap::GenericHTTPClient::QueryHTTPResponseHeader' within `CBitmap'
    
    Projects/generichttpclient.cpp:883: error: cannot declare member function `CBitmap::GenericHTTPClient::QueryHTTPResponse' within `CBitmap'
    Projects/generichttpclient.cpp:885: error: expected `}' at end of input
    
    Projects/GenericHTTPClient.h:52: error: expected unqualified-id at end of input
    Projects/GenericHTTPClient.h:52: error: expected `,' or `;' at end of input
    
    g++.exe Projects/generichttpclient.o  -o "thepost.exe" -L"C:/PROGRAMS/DEV-CPP/lib" -lgdi32 -mwindows  
    
    G__~1.EXE: Projects/generichttpclient.o: No such file or directory
    
    Käivitus peatatud

  8. #8
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    I would direct thestandard output to port 80 and make sure that the output was in ascii but includes all the standard http header data:

    Code:
     cout>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     cout>> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
     cout>> <Content-Type="XHTML/text">
    since cout won't send to port 80 the above won't work, unless your app is running as cgi, but this is how you would encode the output
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  9. #9
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    How to use it then?

  10. #10
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Just how can I send post data in C++ program. Please do not how to do it IN a server or with cgi or any other server-side language. I just want to know how to do it in C++ in an ordinary program running on an ordinary computer.

  11. #11
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    It must be possible, because web browsers do it...

  12. #12
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Stop bumping your threads. If no one has responded it means either:
    - no one knows
    - no one cares to do the research for you
    - anyone that does know doesn't want to give you the answer
    - the cow jumped over the moon.

    Come back with more research done and a more specific question.

  13. #13
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    As a hint:
    Quote Originally Posted by maxorator
    I am trying to send POST data to a PHP script in a C++ program!!!!
    Don't you think maybe you might want to setup a socket connection to the server that has the php page? And after setting up a HTTP request you might want to then send the data? And maybe some guy named Beej might be of some use?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help (Trying to post message)
    By mrkm in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 10-06-2003, 04:05 PM
  2. Post your Best Text Adventure
    By Joe100 in forum Game Programming
    Replies: 3
    Last Post: 08-15-2003, 05:47 PM
  3. Auto POST
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 06-07-2003, 10:42 AM
  4. post update
    By iain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-12-2001, 10:47 AM