ciao a tutti
vorrei sapere come aggiungere una variabile a un header in php...per inviare dei dati
ad esempio header('Content-Type: audio/mpeg');
ma vorrei mandare dei dati personalizzati tipo header('Miainfo: datiMiei');
per vedere l'informazioni dell'header uso:
il risultato è questo ma non mi esce "Miainfo: datiMiei" cioè cio' che io voglio inviare.Codice PHP:
$headers = apache_request_headers();
foreach ($headers as $header => $value) {
echo "$header: $value
\n";
}
Accept: */*
Accept-Language: it
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: localhost
Connection: Keep-Alive
Cache-Control: no-cache
Potete darmi una mano? grazie mille