Commit f951c70b by netz.coop eG

Anfang Startseite fuer Filter

1 parent 111322d9
...@@ -153,5 +153,18 @@ class Connectdb extends SQLite3 ...@@ -153,5 +153,18 @@ class Connectdb extends SQLite3
} }
return $ary_content; return $ary_content;
} }
public function getdomains(){
$result = $this->query('SELECT url FROM domains;');
$ary_content = array();
$h = 0;
while ($res = $result->fetchArray(SQLITE3_ASSOC)) {
foreach ($res as $key => $value) {
$ary_content[$h][$key] .= $value;
}
$h++;
}
return $ary_content;
}
} }
...@@ -100,6 +100,39 @@ class Sytemoutput { ...@@ -100,6 +100,39 @@ class Sytemoutput {
} }
function start_index_html($array_url){
foreach($array_url as $key =>$url){
$http_url = 'http://'.$url['url'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $http_url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
curl_close($ch);
//parsing begins here:
$doc = new DOMDocument();
@$doc->loadHTML($data);
$nodes = $doc->getElementsByTagName('title');
//get and display what you need:
$title = $nodes->item(0)->nodeValue;
$metas = $doc->getElementsByTagName('meta');
for ($i = 0; $i < $metas->length; $i++) {
$meta = $metas->item($i);
if($meta->getAttribute('name') == 'description') {
$description = $meta->getAttribute('content'); }
if($meta->getAttribute('name') == 'keywords') {
$keywords = $meta->getAttribute('content'); }
}
echo "Title: $title". '<br/><br/>';
echo "Beschreibung: $description". '<br/><br/>';
echo "Stichworte: $keywords". '<br/><br/>';
}
}
} }
...@@ -39,12 +39,22 @@ body{ ...@@ -39,12 +39,22 @@ body{
left: calc(50% - 150px); left: calc(50% - 150px);
} }
.header h2 {
position: relative;
top: 18px;
left: calc(50% - 150px);
}
.wrapper { .wrapper {
margin-top: 80px; margin-top: 80px;
margin-bottom: 80px; margin-bottom: 80px;
} }
.wrapper br{
left: calc(50% - 150px);
}
.form-signin { .form-signin {
max-width: 380px; max-width: 380px;
padding: 15px 35px 45px; padding: 15px 35px 45px;
......
<!DOCTYPE html>
<html lang="de">
<head><!-- Required meta tags -->
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS --><link rel="stylesheet" href="../include/libs/bootstrap-4.0.0/css/bootstrap.min.css" >
<link rel="stylesheet" href="../include/css/basic.css" >
</head>
<body><div class="container"><div class="header">
<a href="https://netz.coop"><img class="logo" src="../include/images/logo.png" alt="logo" /></a>
<h1>NCFilters</h1> </div>
<div id="loginbox">
<div class="wrapper">
<form class="form-signin" action="./" method="post">
<fieldset>
<p>
<input type="text" id="username" name="username" placeholder="Name" value="" maxlength="20" />
</p>
<p>
<input type="password" id="password" name="password" placeholder="Passwort" value="" maxlength="20" />
</p>
<p>
<input type="hidden" name="form_token" value="<?php echo $form_token; ?>" /><input class="btn btn-primary btn-sm " type="submit" value="&#10149; Login" title="Login"> </p>
</fieldset>
</form>
</div>
</div><div class="footer">
<small>ncfilters powered by netz.coop eG</small>
</div></div></body>
\ No newline at end of file
iptables -t nat -N OPEN -t nat -N OPEN
iptables -t nat -F OPEN -t nat -F OPEN
iptables -t nat -A OPEN -j ACCEPT -t nat -A OPEN -j ACCEPT
iptables -t nat -N BLOCK -t nat -N BLOCK
iptables -t nat -F BLOCK -t nat -F BLOCK
iptables -t nat -A BLOCK -i eth1 -d 217.13.73.6 -j ACCEPT -t nat -A BLOCK -i eth1 -d 193.99.144.80 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 217.13.73.99 -j ACCEPT -t nat -A BLOCK -i eth1 -d 40.118.6.229 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 217.13.73.99 -j ACCEPT -t nat -A BLOCK -i eth1 -m multiport -p tcp --dports 80,443,8080 -j DNAT --to-destination 10.8.11.10
iptables -t nat -A BLOCK -i eth1 -d 217.13.73.44 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 81.24.75.240 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 88.215.233.20 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 193.96.226.140 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 81.24.75.240 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 91.197.29.51 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 80.237.133.162 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 188.64.58.118 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 78.41.149.100 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 95.143.172.226 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 134.119.130.3 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 149.219.205.67 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 185.30.93.10 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 212.12.48.72 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -d 89.146.224.244 -j ACCEPT
iptables -t nat -A BLOCK -i eth1 -m multiport -p tcp --dports 80,443,8080 -j DNAT --to-destination 10.8.11.10
<!DOCTYPE html>
<html lang="DE_de">
<title>Die Startseite</title>
<head><!-- Required meta tags -->
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS --><link rel="stylesheet" href="../include/libs/bootstrap-4.0.0/css/bootstrap.min.css" >
<link rel="stylesheet" href="../include/css/basic.css" >
</head>
<body>
<div class="container">
<div class="header">
<!-- <a href="https://netz.coop"><img class="logo" src="../include/images/logo.png" alt="logo" /></a> -->
<h1>Die Startseite</h1>
<h2>Grundschule Amshausen</h2></div>
<div class="wrapper">
</div></div>Title: heise online - IT-News, Nachrichten und Hintergründe
<br/><br/>Description: News und Foren zu Computer, IT, Wissenschaft, Medien und Politik. Preisvergleich von Hardware und Software sowie Downloads bei Heise Medien.<br/><br/>Keywords: heise online, c't, iX, Technology Review, Newsticker, Telepolis, Security, Netze<br/><br/>Title: Aktuelle Nachrichten online - FAZ.NET<br/><br/>Description: News, Nachrichten und aktuelle Meldungen aus allen Ressorts. Politik, Wirtschaft, Sport, Feuilleton und Finanzen im Überblick.<br/><br/>Keywords: News, Politik, Wirtschaft, Gesellschaft, Finanzen, Sport, Feuilleton, Technik & Motor, Wissen, Reise, Beruf & Chance, Rhein-Main<br/><br/>
</div>
<div class="footer">
<small>ncfilters powered by netz.coop eG</small>
<html>
<title>Hallo</title>
<body>
Und nochmal "Hallo"!
</body>
</html>
Title: heise online - IT-News, Nachrichten und Hintergründe
<br/><br/>Description: News und Foren zu Computer, IT, Wissenschaft, Medien und Politik. Preisvergleich von Hardware und Software sowie Downloads bei Heise Medien.<br/><br/>Keywords: heise online, c't, iX, Technology Review, Newsticker, Telepolis, Security, Netze<br/><br/>Title: Aktuelle Nachrichten online - FAZ.NET<br/><br/>Description: News, Nachrichten und aktuelle Meldungen aus allen Ressorts. Politik, Wirtschaft, Sport, Feuilleton und Finanzen im Überblick.<br/><br/>Keywords: News, Politik, Wirtschaft, Gesellschaft, Finanzen, Sport, Feuilleton, Technik & Motor, Wissen, Reise, Beruf & Chance, Rhein-Main<br/><br/>
\ No newline at end of file
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
require_once './include/configure.php';
require_once './include/classes/Connectdb.php';
require_once './include/classes/Sytemoutput.php';
$db = new Connectdb();
$array_domains = $db->getdomains();
$sysout = new Sytemoutput();
$sysout->start_index_html($array_domains);
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!