Salve a tutti.
Sto cercando di capire come funzione l'oggetto XMLHttpRequest per poter ottenere informazioni dal server in maniera asincrona.

Per iniziare non voglio fare nulla di complicato, voglio solo contattare una pagina (php) che mi dia come risposta ciò che contiene dell'array $_GET e nell'array $_POST; ecco il cidice di riferimento che ho scritto per questa pagina:
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    </head>

    <body>

        <?php
        
echo "Nell'array POST:
"
;
        foreach (
$_POST as $key => $value) {
            echo 
'Key = ' $key '-> Value = ' $value '<hr>';
        }

        echo 
"
Nell'array GET:
"
;
        foreach (
$_GET as $key => $value) {
            echo 
'Key = ' $key '-> Value = ' $value '<hr>';
        }
        
?>
    </body>
</html>
nota:
Questa pagina l'ho hostata sia in locale che sul link: http://ifritprogressive.altervista.org/post.php
Seguendo un po di guide trovate in rete, e anche quella che si trova su queste pagine, ho scritto questo codice js:
Codice PHP:
window.onload main;

function 
main() {

    var 
local_url "http://127.0.0.1/post.php"
    
var site_url "http://ifritprogressive.altervista.org/post.php"
    
var http = new XMLHttpRequest();
    
http.open("GET"site_urltrue);

    
http.setRequestHeader("Content-Type""application/x-www-form-urlencoded");

    
http.onreadystatechange = function() {
        if (
http.readyState == 4) {
            
document.body.appendChild(document.createTextNode(this.status));
        }
    }

    
http.send(null);

Il problema che riscontro è che lo status si porta a zero, e nel responseText non trovo nulla.

Ho fatto molte prove ( piu' e meno verbose ), in cui cambiavo host, provavo nuovi header, e testavo lo stesso codice su piu' browser ( Firefox & Chrome ).

Non riesco a capire cosa è che non va, qualcuno puo' aiutarmi??