Próbowałem wykorzystać do tego parametr $context w fopen" title="Zobacz w manualu php" target="_manual, ale otrzymuję z serwera błąd 400: Bad request.
<?php $request = "dane=1"; $header = "Host: server.netrn"; $header .= "Content-Type: application/x-www-form-urlencodedrn"; $header .= "Connection: closern"; $opts['http']['method'] = "POST"; $opts['http']['header'] = $header; $opts['http']['content'] = $request; ?>
Kod
HTTP request failed! HTTP/1.1 400 Bad Request
Próbowałem też wysłać podobny nagłówek za pomocą fsockopen" title="Zobacz w manualu php" target="_manual, ale efekt jest taki sam.