Whats wrong with printing

wxdqz

New Member
Please tell me whats wrong with this.

<?
if ($HTTP REFERER)
$myURL: = $HTTP-REFERER;
else
$myURL = "http://vsbabu.csoft.net/";

// here is the starting comment for your content
$START-CONT="document-starts-here";
// here is the ending comment for your content
$END-CONT = "document-ends-here";

$parsed_Url = parse_url($myURL);
$myserver = $parsed_url['host'];
$document = $parsed_url['path'];
if($document[strlen($document)-1]=='/') $document = "$document/index.html";
$base_url = dirname($document);

$fp=fsockopen($myServer,80,&$errno,&$errstr,30);

// if you've name based virtual hosting
$request = 'GEt $document HTTP/1.1\r\n";
$request .= "Host: $myServer\r\n\r\n";
/* if you've normal old type servers,
comment out the previous two lines and
use the next line instead
/*
//$request = "GET $document HTTP/1.0\r\n\r\n";

if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs($fp,$request);
$content=O;
$in_title=O;
?>

<HEAD>
<BASE HREF=http://www.phpbuilder.com/board/archive/index.php/"<? echo "http://$myServer$base-url/"; ?>">
<STYLE TYPE="TEXT/CSS">
body,p {
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: lopt;
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
color: #000000;
text-align: justify;
}
TH.headerrow {
background-color: #CDCBBI;
font-family: verdana,courier;
font-size: lopt;
color: black;
}
TD.datarow {
font-family: verdana,courier;
font-size: lopt;
color: black;
}

//->
</STYLE>
<?
while(!feof($fp)) {
$line=fgets($fp,4096);
//this is the stupid part - get the title
//python makes this so easy :-)
if(eregi("<title>",$line)){ $in_title=l; }
if ($in_title==l) $title.=$line;
if(eregi("</title>",$line)){
$in_title=O;
if(!eregi("<title>",$line))
$title.=$line;
}
if(ereg($START_CONT,$line)) {
$title = eregi_replace("</title>",",eregi_replace("<title>","",$title));
echo "<TITLE>$title</TITLE>\n</HFAD>\n<BODY>\n";
$content=l;
}
if(ereg($END_CONT,$line)) $content=0;
if($content==l)echo $line;
}
fclose ($fp);
<HR>
<CENTER>
<SMALL>Copyright &copy; <U>V.Satheesh Babu</U>. All rights reserved.</SMALL><BR>
<?echo "<A HREF=\"$myURL\"><SMALL><I>$myURL</I></SMALL></A>\n";?>
</CENTER>
</BODY>

}
?>
 
Back
Top