$sizestat = getimagesize($wmyrow["ksw_add"]);
if ($sizestat[0]>300) {
$newwidth=300;
$newheight=$sizestat[1] * $newwidth / $sizestat[0];
}
else
{
$newheight=$sizestat[1];
$newwidth=$sizestat[0];
};
printf('
', $wmyrow["ksw_title"]);
printf('

', stripadd($wmyrow["ksw_add"]), $newheight, $newwidth);
$gall = $wmyrow["ksw_where"];
if ($gall >"") {
if (substr($gall,0,7) == 'http://') {
$theirsite = substr($gall,7,strlen($gall));
if (substr($theirsite,0,4) == 'www.') {$theirsite = substr($theirsite,4,strlen($theirsite));};
$finddot = strpos($theirsite,'.');
if ($finddot >0) {
$theirsite = substr($theirsite,0,$finddot);
}
$gall = '
' . $theirsite . '';
};
};
printf('
%s
', $wmyrow["ksw_medium"]);
$trytxt = $wmyrow["ksw_add"];
$trytxt = str_replace("/img/", "/txt/", $trytxt);
$trytxt = str_replace(".jpg", ".txt", $trytxt);
$trytxt = str_replace(".JPG", ".txt", $trytxt);
//echo $trytxt;
$file_headers = @get_headers($trytxt);
if($file_headers[0] != 'HTTP/1.1 404 Not Found') {
echo '
' . nl2br(file_get_contents($trytxt));
};
//printf("Thumb=%s from %s",$tryth, $imgpos);
?>