Yesterday I asked a question about socket file data in php page.
Link here
Upload and POST file to PHP page
When I follow the path, I changed my code.
char *str="POST /path/upload_file.php HTTP/1.0 \n Host: 00.00.00.00 \n Content-Disposition: name=2.jpg;filename=2.jpg\r " ;
write(sockfd, buf, filestat.st_size);
sprintf(send1,"%s%s\r\n",str,buf);
retval= send(sockfd,send1,sizeof(send1),0);
When I run the program, I can get
Result: 501 Method not implemented
Method not implemented
to / index.html is not supported.Invalid method in request
Apache / 1.3.39 Server on localhost Port 80I think this is possible: 1. can apache not support something?
(my apache does not support ssl) 2. Is the HTTP protocol not the details? 3. other?
Many thanks.
source
share