Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = "http://www.pslib.cz/files/rozvrhy/trzn.htm";
- $str = file_get_contents($url);
- strip_tags($str, "<tr></tr><td></td><table></table><br>");
- $pieces = explode("<tr>", $str);
- $out = ("<html>
- <head>
- <meta http-equiv=\"Content-Language\" content=\"cs\">
- <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\">
- <meta http-equiv=\"Pragma\" content=\"no-cache\">
- <title>Bakaláři - Rozvrh hodin</title>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"styly_r.css\">
- </head>
- <body class=\"rozvrh_1\">
- <table class=\"tb_rozvrh_1\" width=\"100%\">
- <tr>
- <td class = \"td_ohr_1\" width=\"1%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"3%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"8%\" height=\"5px\"></td>
- <td class = \"td_ohr_1\" width=\"1%\" height=\"5px\"></td>
- </tr><tr>");
- for ($i = 1; $i < sizeof($pieces); $i++) {
- if (strpos($pieces[$i], 'Č<br>t') !== false) {
- $out .= $pieces[$i];
- for ($x=$i+1;$x<sizeof($pieces);$x++){
- if (strpos($pieces[$x], '3%') !== false) {
- break;
- }
- else
- {
- $out .= $pieces[$x];
- }
- }
- }
- }
- $out .= "<tr></body>
- </html>
- ";
- echo $out;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement