-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgwp_reg.php
More file actions
37 lines (30 loc) · 1.32 KB
/
Copy pathgwp_reg.php
File metadata and controls
37 lines (30 loc) · 1.32 KB
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
<?php header('Content-Type: text/html; charset=utf-8'); ?>
<?PHP
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo "{{subst:SUBPAGENAME}} zu [[{{subst:BASEPAGENAME}}]], erzeugt via [$actual_link] am {{subst:CURRENTDAY}}. {{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}<br>{{TOC}}<br>";
$ofb = $_REQUEST['ofb'];
$modus = $_REQUEST['modus'];
$beginningOfContent = "<table width=100% BORDER=0 CELLSPACING=0 CELLPADDING=4 align=center>";
$endOfContent = "</table>";
$page = "http://www.genpluswin-database.de/nofb/ofb/$ofb/index.php?id=$modus";
$end = 65+26;
for($i=65; $i< $end; $i++)
{
$letter = chr($i);
$url = $page . "&ia=$letter";
$oneLetterPage = file_get_contents ($url);
$indexOfBeginning = strpos($oneLetterPage, $beginningOfContent);
$indexOfEnd = strpos($oneLetterPage, $endOfContent, $indexOfBeginning);
$length = $indexOfEnd - $indexOfBeginning;
$content = strip_tags(str_replace("<br>", " — ", substr($oneLetterPage, $indexOfBeginning, $length)));
$indexLastBreak = strrpos($content, "—");
$content = substr($content, 0, $indexLastBreak);
// var_dump($content);
if(strlen($content)>1 && !stristr($content, "Es wurden keine Ergebnisse mit"))
{
echo "== $letter ==<br>";
echo strip_tags($content);
echo "<br>";
}
}
?>