Salve a tutti,
questo tema era già stato trattato in un'altra discussione dove il problema è lo stesso.
Sto cercando di eseguire un POST verso una pagina php da un codice C, ma la variabile $_POST è sempre vuota.
Richiesta POST:
Codice PHP:Codice:POST /_credits/loadWatchInfo.php HTTP/1.1\r\nHost: clockmania.altervista.org\r\nUser-Agent: Arduino\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 9\r\n\r\nuser=test\r\n
Codice:<html> <head></head> <body> <?php $user = ''; if (!empty($_POST['user'])) { $user = $_POST['user']; printf("user set!!!"); } else { printf("user NOT set...why???"); } printf("[debug]ciao utente %s<br>",$user); ?> </body> </html>
Se uso il metodo GET, funziona...
Dove sta il problema????

LinkBack URL
About LinkBacks
