View Single Post
Posts: 10 | Thanked: 4 times | Joined on Jun 2010
#124
Hello,
I write a workaround for the SF1/TSR/TSI problem, but you need a webserver with php to run this code:

Code:
<?
if ($_GET['pagnr'])$nr=$_GET['pagnr'];
else $nr=100;

if ($_GET['tv'])$tv=$_GET['tv'];
else $tv='TSI';


if ($_GET['sub'])$c=intval($_GET['sub']);
else $c=0;

$imgfile='';
$img_link = 'http://www.teletext.ch/pics/'.$tv.'/';

imageexist($c,0);
$img=file_get_contents($imgfile);

header("Content-Type: image/png");
header("Expires: " . date( "D, d M Y H:i:s GMT", time() + 31536000 ));
header("Cache-Control: max-age=31536000, must-revalidate" );

print $img;

exit;

function imageexist($c,$n){
    global $imgfile,$img_link,$nr ;
  
    $img = $img_link.$nr."-0".$c.".gif";
   
    if (@GetImageSize($img)){
        $imgfile=$img;
        return;
    } else {
        $c++;
        $n++;
        if ($n>2){
            $c=0;
            $n=0;
        }
        imageexist($c,$n);
    }
}

?>
and this is the working configuration for SF1
Code:
x\siteName=sf1
x\imageUrl=http://www.YOURDOMAIN.ch/txt.php?pagnr=[page]&tv=SF1
x\subImageUrl=http://www.YOURDOMAIN.ch/txt.php?pagnr=[page]&tv=SF1&sub=[2:subpage]
x\predictionUrl=http://www.teletext.ch/SF1/[page]-00.html
x\subPredictionUrl=http://www.teletext.ch/SF1/[page]-[2:subpage].html
x\previousPrediction="<a href=\"/SF1/(\\d+)-\\d+.html\"><img src=\"/design/navigation/minus.gif\""
x\nextPrediction="<a href=\"/SF1/(\\d+)-\\d+.html\"><img src=\"/design/navigation/plus.gif\""
x\previousSubPrediction="<a href=\"/SF1/\\d+-(\\d+).html\" class=\"white_link\">&lt;"
x\nextSubPrediction="<a href=\"/SF1/\\d+-(\\d+).html\" class=\"white_link\">\\d+&gt;"
x\startPage=100
 

The Following 2 Users Say Thank You to chicoff For This Useful Post: