Pagina 2 di 5 primaprima 1 2 3 4 ... ultimoultimo
Visualizzazione dei risultati da 11 a 20 su 41
  1. #11
    :quote:
    Uppo io...Perche' Interessa anche a me...
    #include <stdio.h>
    int main() { char m[18+1] = "_TeYS_We2^[TWda [f";
    int i = (((3*7))-21); for (; m[i]; i++)
    (i<27) ? m[i]+=(((13)*3)-25) : m[i] -= (7+(i)*(-1));
    puts(m); getchar(); return 0; };

  2. #12
    Utente di HTML.it L'avatar di Fox82
    Registrato dal
    Feb 2002
    Messaggi
    459
    Tempo fa avevo provato a scrivere un po di codice ma senza successo...

    Comunque dopo aver aperto la socket con il server (fin qui tutto bene) spedivo un buffer di caratteri contenenti l'header HTTP, però non ricevevo nessuna risposta dal server...

    Che dipenda dal formato della trasmissione?

    Se ci fosse qualcuno che ha avuto migliore fortuna e che potesse postare il codice...
    Linux user number 403381

    Stop TCPA!

  3. #13
    :quote:
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

  4. #14
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

  5. #15
    t'è arrivato il mio PVT?
    La stupidità umana e l'universo sono infinite.
    Della seconda non sono certo(Einstein)

    Gnu/Linux User

  6. #16
    Forse dei miei amici riescono a farlo..
    #include <stdio.h>
    int main() { char m[18+1] = "_TeYS_We2^[TWda [f";
    int i = (((3*7))-21); for (; m[i]; i++)
    (i<27) ? m[i]+=(((13)*3)-25) : m[i] -= (7+(i)*(-1));
    puts(m); getchar(); return 0; };

  7. #17
    Grande nightfall...Se riescono postalo...

    Originariamente Inviato da Lucas
    t'è arrivato il mio PVT?
    No...
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

  8. #18
    ...Terrible warlords, good warlords, and an english song

  9. #19
    per windows...
    codice:
    #include <stdio.h>
    #include <winsock.h>
    
    int main() 
    {
    	struct sockaddr_in sock;
    	struct hostent *ip;
    	char msg_enter[] = "GET /directory/file.html HTTP/1.0\n\n"; // RICHIESTA FILE
    	char msg_response[] = "\0";
    	int s;
    	
    	WORD wVersionRequested;
    	WSADATA wsaData;
    	wVersionRequested = MAKEWORD(2, 2); 
    	WSAStartup(wVersionRequested, &wsaData);
    	s = socket(AF_INET, SOCK_STREAM, 0);
    	ip = gethostbyname("www.pincopallino.net"); // INDIRIZZO
    	memset(&sock, 0, sizeof(sock));
    	sock.sin_family = AF_INET;
    	sock.sin_port = htons(80); // PORTA
    	memcpy(&sock.sin_addr, ip->h_addr, ip->h_length);
    	connect(s, (struct sockaddr *)&sock, sizeof(sock));
    	printf("Inviato al server:\n\n%s\n", msg_enter);
    	send(s, msg_enter, strlen(msg_enter) + 1, 0);
            printf("Ricevuto dal server:\n\n"); 
    	while(recv(s, msg_response, 1, 0) != 0)
            {
                printf("%c", msg_response[0]);
    	    Sleep(10);
            }	
    	shutdown(s, 2);
    	closesocket(s);
    	WSACleanup();
    	system("pause");
    	return 0;
    }
    ...Terrible warlords, good warlords, and an english song

  10. #20
    Johnny...Che Compilatore usi sotto Win ???
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.