tweakersnet-subjects

Gesponsorde koppelingen

PHP script bestanden

  1. tweakersnet-subjects

« Lees de omschrijving en reacties

<!--
########################################################################
Tweakers.NET Reader
Made by Flesh[BE]
[email protected]
########################################################################
Don't remove this info plz.
SPECIAL THANKS TO TWEAKERS.NET FOR THE NEWS-ITEMS!
########################################################################
-->
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #000000;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style><table width="90%" border="1" style="border-collapse:collapse" bordercolor="#000000">

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?
//Edit hier het aantal artikels dat je wenst te tonen:
$aantalartikelen = 10;

//########################################################################
//                            DON'T CHANGE SOMETHING BELOW!
//########################################################################


$aantaltopics = 0;
$dateold = 0;

//Bron openen of foutmelding geven
if (($bron = @file("http://www.tweakers.net/","r"))==false) die("Kan URL niet openen!");
//Heel de bron doorlopen(regele per regel) te beginnen tijd 0 tot $aantalregels
for($regel=0;count($bron)>$regel;$regel++) {
    if (strstr($bron[$regel], "fp_3(")){
        if ($aantaltopics < 10) {
            //Totale Header uitlezen
            $header = trim($bron[$regel]);  
            $p = strpos($header, "fp_3(");
            $header = substr($header, -((strlen($header)-$p)-((strlen(");")))));
            $header = str_replace("_3(", "", $header);
            $header = str_replace(");", "", $header);
            //Cathogorienr uitlezen
            $p = strpos($header, ",");
            $catnr = substr($header,0,$p);     
            //Uur uitlezen
            $header = str_replace($catnr.",'", "", $header);
            $p = strpos($header, "'");
            $uur = substr($header,0,$p);
            //Newdid uitlezen
            $header = str_replace($uur."','", "", $header);
            $p = strpos($header, "'");
            $newsid = substr($header,0,$p);
            //Title uitlezen
            $header = str_replace($newsid."','", "", $header);
            $p = strpos($header, "','");
            $title = substr($header,0,$p);
            //Aantal Reacties
            $header = str_replace($title."','", "", $header);
            $p = strpos($header, "',");
            $reacties = substr($header,0,$p);
            //Time uitlezen
            $header = str_replace($reacties."',", "", $header);
            $time = substr($header,0,10);
            if ($catnr == 2) $cathegorie = "Hardware";
            if ($catnr == 3) $cathegorie = "Software";
            if ($catnr == 4) $cathegorie = "Games";
            if ($catnr == 5) $cathegorie = "Internet";
            if ($catnr == 347) $cathegorie = "Business";
            if ($catnr == 348) $cathegorie = "Technologie";
            $date = date('dmY',$time);
            if ($date != $dateold) { echo '<tr><td colspan="3"><br>'.date('D d F Y',$time).'</td></tr>'; }
            $dateold = $date;
            echo '<tr><td>'.date('[H:i]',$time).'</td><td>'.$cathegorie.'</td><td><a href="http://www.tweakers.net/nieuws/'.$newsid.'" target="_blank">'.stripslashes($title).'</a></td></tr>';
        }

        $aantaltopics++;
    }
}
        
?>

</table>
<br>
News by <a href="http://www.tweakers.net" target="_blank">Tweakers.NET</a>!
<!--
########################################################################
Tweakers.NET Reader
Made by Flesh[BE]
[email protected]
########################################################################
-->

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.