Hi all,
Is it possible to loop a connection to a site where different pages only means changing 1 number.
The modified socket details below work fine the first time round, but when it loops the first print (debug) works, but is followed by numbers from the first selection and the printf(enter new number) never shows.
while(1) {
printf("Debug Test") ;
printf("\nEnter New Number ");
fgets(NewNum,7,stdin) ;
sBuffer1 = "GET /Path" ;
char *sBuffer2 = NewNum ;
strcat(sBuffer1,sBuffer2) ;
sent_bytes = send(sDesc, sBuffer1, (int) strlen(sBuffer1), 0) ;
data_bytes = recv(sDesc, buffer, BUFF, 0) ;
buffer[data_bytes] = '\0' ;
printf("%s",buffer) ;
}
John