Moin,

ich wollte einen Post-Parameter mit meinem C/C++ Programm an eine website schicken und mich so zb. dort einloggen.

hier ersma mein beispielcode :

PHP-Code:
<?PHP
$name
=$_POST[name];
$pw=$_POST[password];
if(
$name == test && $pw == pass) {
    echo 
"Login stimmt";
    } else {
    echo 
"Login falsch";
}
?>
Das Socket erstellen und Senden des Post-Parameters ist kein problem aber ich erhalte immer :

Code:
 HTTP/1.1 200 OK
Date: Sat, 29 May 2010 16:25:41 GMT
Server: Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1
X-Powered-By: PHP/5.3.1
Content-Length: 12
Content-Type: text/html

Login falsch
So sieht mein Parameter aus :
Code:
POST /login.php HTTP/1.1\r\n
Host: 127.0.0.1\r\n
User-Agent: Mozilla/4.0\r\n
Content-type: aplication/x-www-form-urlencoded\r\n
Content-length: 23\r\n\n
name=test&password=pass
was ist daran falsch?