J'ai besion de faire un socket, donc j'en ai récuperer un sur internet
c'est ok toutes les page marche : html,php.
Mais juste sur le site que je doit me connecter sa ne marche pas ! (les page php marche pas, mais html oui) voila l'erreur renvoyer :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
HTTP/1.1 500 Internal Server Error
Date: Sun, 15 Jan 2006 11:12:25 GMT
Server: Apache/1.3.33 (Unix)
Connection: close
Content-Type: text/html; charset=iso-8859-1
 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
 webadmin@kundenserver.de and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<P>Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.
</BODY></HTML>
Le code du socket :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
     SOCKET W_IP;
     IN_ADDR Adresse;
     SOCKADDR_IN SockAddrIn;
     HOSTENT * Hote;
     WSADATA WSAData;
     char Buffer[9999] = "";
     static char IP[16];
 
     WSAStartup(0x0202, &WSAData);
     W_IP = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
     Hote = gethostbyname("helicoptere-avis.com");
     memcpy(&Adresse, Hote -> h_addr, Hote -> h_length);
     SockAddrIn.sin_family = AF_INET;
     SockAddrIn.sin_port = htons(80);
         SockAddrIn.sin_addr = Adresse;
     connect(W_IP, (SOCKADDR *)&SockAddrIn, sizeof(SockAddrIn));
     sprintf(Buffer, "%s", "GET  http://helicoptere-avis.com/index.php HTTP/1.0 \n\n");
     send(W_IP, Buffer, strlen(Buffer), 0);
     recv(W_IP, Buffer, sizeof(Buffer), 0);
     ofstream log("protsock.log");
     log << Buffer;
     SetDlgItemText(hDlg, 155, Buffer); 
     closesocket(W_IP);
     WSACleanup();
Je ne comprend pas sur le site en question les page html marche (je reçois le code de la page, mais avec php je reçois l'erreur ci-dessus)
Je rappelle que sur d'autre site ça marche !
L'hébergeur et 1&1 http://commander.1and1.fr/
compiler avec devc++
Merci de vos reponces