Inne kolorowanie znaków nowej lini pozostało, ale poza tym... sami oceńcie
test:
[php:1:883386b2b1]<?php
// to był niegdyś problematyczny kod //
/*
by Seth
2002
*/
$host = '<nazwa hosta>'; // daj np: www.wp.pl
$adress = '<adres pliku>'; // np: / lub /index.html
$port = 80;
$errmsg = null;
$errno = null;
$chndr = fsockopen( $host, $port, &$errno, &$errmsg, 3 );
if ( $chndr == false )
{
print 'Blad nr: '.$errno.' wiadomosc bledu: '.$errmsg.'<br />';
}
else
{
fputs( $chndr, 'GET '.$adress." HTTP/1.0rn" );
fputs( $chndr, "Host: $hostrn" );
fputs( $chndr, "Referer: http://$host/rn" );
fputs( $chndr, "Content-type: application/x-www-form-urlencodedrn" );
fputs( $chndr, "Connection: closernrn" );
$end_headers = false;
$headers = '';
while ( !feof( $chndr ) )
{
$line = fgets( $chndr, 1024 );
if ( $end_headers === false )
{
$headers .= $line;
}
if($end_headers === false && ($line == "rn" || $line == "n"))
{
$end_headers = true;
}
}
}
print $headers;
// teraz jest OK

//
?>[/php:1:883386b2b1]