Код:
<?php
error_reporting(0);
header("Content-type: text/html; charset=Windows-1251");
$read = $_GET['read'];
if(is_numeric($read)){
@$content = file_get_contents("http://www.linux-bg.org/cgi-bin/y/index.pl?page=news&key=$read");
$razdel = explode("</u>","$content");
$razdel = explode("<u>","$razdel[0]");
$razdel = $razdel[1];
$title = explode("<u>$razdel</u></a>»","$content");
$title = explode("</td>","$title[1]");
$title = $title[0];
$autor = explode("от <i>","$content");
$autor = explode("(","$autor[1]");
$autor = $autor[0];
$new = explode(") </i></font><br><p><font face=\"Verdana\" size=\"-1\">","$content");
$new = explode("</font>","$new[1]");
$new = $new[0];
echo "Заглавие: $title<p>Автор: $autor<p>Категория: $razdel:<hr>$new<hr>";
}
$content = file_get_contents("http://linux-bg.org");
$explode = explode("<table border=\"0\" width=\"100%\">","$content");
$explode = explode("<td background=\"/themes/blju2/cnt_body_bg.gif\">","$explode[0]");
$content = $explode[1];
$linkarray = explode("<a href","$content");
$count = -1;
foreach($linkarray as $new){
$count = $count + 1;
$link = explode(" ","$new");
$link = explode("key=","$link[0]");
$link = $link[1];
$last = $link[strlen($link)-1];
$link = str_replace("$last","","$link");
$links[$count] = $link;
}
$count = 0;
$titlearray = explode("</a>","$content");
foreach($titlearray as $title){
$count = $count + 1;
$title = explode("class=\"indexb\">","$title");
$title = $title[1];
$titles[$count] = $title;
}
$count = -1;
do
{
$count = $count + 1;
if($links[$count] !== "" and $titles[$count] !== "") echo "<a href=?read=$links[$count]>$titles[$count]</a><br>";
}
while($count < 15);
?>
Писан е от мен