22 Commits

Author SHA1 Message Date
Sebastian Titz
9a024c5c88 Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib into
HEAD

Conflicts:
	ips/crawler.php
2021-07-26 15:23:00 +02:00
Sebastian Titz
f9a0e41889 bing bot 2021-07-26 12:33:58 +02:00
troy
e17e570114 crawler ips 2021-07-24 09:50:22 +02:00
50b3d192ba neue bot ips 2021-07-19 14:22:19 +02:00
Sebastian Titz
b2e6260dfb in string fkt 2021-07-15 08:56:38 +02:00
admin
ed87d341ab bot ips zentral sammeln 2021-07-14 20:09:48 +02:00
admin
df5d1447af Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib
Conflicts:
	string.php
2021-07-13 21:38:08 +02:00
admin
2352fd5396 linkify tool um urls in text in echte links zu verwandeln 2021-07-13 21:37:14 +02:00
Sebastian Titz
385a02c90f ? 2021-07-12 13:40:12 +02:00
admin
8638f28847 fix only alpha 2021-07-11 10:32:35 +02:00
home
5f2502877b . 2021-07-10 14:45:56 +02:00
admin
8eccdffb1e Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib
Conflicts:
	secret.php.example
2021-05-22 09:25:26 +02:00
admin
c858d5dd32 mail sender update 2021-05-22 09:24:33 +02:00
Sebastian Titz
234e187a54 merge 2021-05-10 13:27:51 +02:00
d8f5fd7f3a pub 2021-05-10 09:57:56 +02:00
admin
a30fd21842 Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib.git
into HEAD

Conflicts:
	.gitignore
	README.md
	_func.php
	secret.php.example
	sql.php
2021-05-09 18:13:15 +02:00
admin
57421ead5e . 2021-05-09 18:10:53 +02:00
a846fe2fa7 Initial commit 2021-05-09 15:10:06 +02:00
troy grunt
06a3112617 . 2021-04-09 15:13:07 +02:00
troy grunt
064d8f0df3 Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib 2021-04-09 15:11:31 +02:00
troy grunt
19dcea8344 Merge branch 'master' of https://git.seemsleg.it/pub/php-func-lib
Conflicts:
	README.md
2021-04-09 15:04:31 +02:00
b8e078f470 Initial commit 2021-04-06 13:39:59 +02:00
8 changed files with 152 additions and 124 deletions

View File

@@ -1,3 +1,2 @@
git submodule add https://git.seemsleg.it/ef/php-func-lib lib
test
# php-func-lib
git submodule add https://git.seemsleg.it/pub/php-func-lib lib

14
ips/crawler.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
$_ips_crawler = array (
'40.77.167.56 ', // bing bot
'66.249.',
'62.138.',
'62.210.149.60',
'92.118.160.37', // netsystem research bot
'104.155.85.84',
'114.119.1', // petalbot
'185.191.171.6', // semrush bot
'207.46.13.124', // bing bot
'54.36.148.' //ahrefbot
);
?>

View File

@@ -1,17 +1,20 @@
<?php
function send_mail($an, $betreff, $text, $ok = '', $error = '') {
include 'secret.php';
$sender = 'noreply@troy-grunt.de';
if (isset ( $_sendermail )) {
$sender = $_sendermail;
}
$header = 'From: ' . $sender . "\r\n";
$header .= 'To: ' . $an . "\r\n";
$header .= 'Content-Type:text/html' . "\r\n";
$header .= 'Content-Transfer-Encoding: 8bit' . "\r\n";
$header .= 'X-Mailer: PHP/' . phpversion ();
function send_mail($an, $betreff, $text, $ok = '', $error = '')
{
$header = 'From: noreply@isleofhope.de' . "\r\n";
$header .= 'To: ' . $an . "\r\n";
$header .= 'Content-Type:text/html' . "\r\n";
$header .= 'Content-Transfer-Encoding: 8bit' . "\r\n";
$header .= 'X-Mailer: PHP/' . phpversion();
if (mail($an, $betreff, $text, $header) === true) {
echo $ok;
} else {
echo $error;
}
if (mail ( $an, $betreff, $text, $header ) === true) {
echo $ok;
} else {
echo $error;
}
}

View File

@@ -7,4 +7,6 @@ $_m['pass'] = '';
$_m['data'] = '';
$_m['pre'] = 'efcms2_';
$_m['salt'] = '';
$_sendermail = 'noreply@troy-grunt.de';
?>

View File

@@ -1,21 +1,21 @@
<?php
function umlaute($str) {
return str_replace ( array (
'Ä',
'Ö',
'Ü',
'ä',
'ö',
'ü',
'ß'
'Ä',
'Ö',
'Ü',
'ä',
'ö',
'ü',
'ß'
), array (
'&Auml;',
'&Ouml;',
'&Uuml;',
'&auml;',
'&ouml;',
'&uuml;',
'&szlig;'
'&Auml;',
'&Ouml;',
'&Uuml;',
'&auml;',
'&ouml;',
'&uuml;',
'&szlig;'
), $str );
}
function chk($str) {
@@ -23,11 +23,11 @@ function chk($str) {
}
function noScript($str) {
return str_replace ( array (
'<',
'>'
'<',
'>'
), array (
'&lt;',
'&gt;'
'&lt;',
'&gt;'
), $str );
}
function random($name_laenge) {
@@ -127,134 +127,144 @@ function markUp($text) {
}
function onlySimpleHTML($s) {
$s = str_replace ( array (
'<',
'>'
'<',
'>'
), array (
'{{|-&lt;-|}}',
'{{|-&gt;-|}}'
'{{|-&lt;-|}}',
'{{|-&gt;-|}}'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}b{{|-&gt;-|}}',
'{{|-&lt;-|}}b/{{|-&gt;-|}}'
'{{|-&lt;-|}}b{{|-&gt;-|}}',
'{{|-&lt;-|}}b/{{|-&gt;-|}}'
), array (
'<b>',
'<b/>'
'<b>',
'<b/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}u{{|-&gt;-|}}',
'{{|-&lt;-|}}u/{{|-&gt;-|}}'
'{{|-&lt;-|}}u{{|-&gt;-|}}',
'{{|-&lt;-|}}u/{{|-&gt;-|}}'
), array (
'<u>',
'<u/>'
'<u>',
'<u/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}i{{|-&gt;-|}}',
'{{|-&lt;-|}}i/{{|-&gt;-|}}'
'{{|-&lt;-|}}i{{|-&gt;-|}}',
'{{|-&lt;-|}}i/{{|-&gt;-|}}'
), array (
'<i>',
'<i/>'
'<i>',
'<i/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}span{{|-&gt;-|}}',
'{{|-&lt;-|}}span/{{|-&gt;-|}}'
'{{|-&lt;-|}}span{{|-&gt;-|}}',
'{{|-&lt;-|}}span/{{|-&gt;-|}}'
), array (
'<span>',
'<span/>'
'<span>',
'<span/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}b{{|-&gt;-|}}',
'{{|-&lt;-|}}b/{{|-&gt;-|}}'
'{{|-&lt;-|}}b{{|-&gt;-|}}',
'{{|-&lt;-|}}b/{{|-&gt;-|}}'
), array (
'<b>',
'<b/>'
'<b>',
'<b/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}br{{|-&gt;-|}}',
'{{|-&lt;-|}}br/{{|-&gt;-|}}'
'{{|-&lt;-|}}br{{|-&gt;-|}}',
'{{|-&lt;-|}}br/{{|-&gt;-|}}'
), array (
'<br>',
'<br/>'
'<br>',
'<br/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h1{{|-&gt;-|}}',
'{{|-&lt;-|}}h1/{{|-&gt;-|}}'
'{{|-&lt;-|}}h1{{|-&gt;-|}}',
'{{|-&lt;-|}}h1/{{|-&gt;-|}}'
), array (
'<h1>',
'<h1/>'
'<h1>',
'<h1/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h2{{|-&gt;-|}}',
'{{|-&lt;-|}}h2/{{|-&gt;-|}}'
'{{|-&lt;-|}}h2{{|-&gt;-|}}',
'{{|-&lt;-|}}h2/{{|-&gt;-|}}'
), array (
'<h2>',
'<h2/>'
'<h2>',
'<h2/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h3{{|-&gt;-|}}',
'{{|-&lt;-|}}h3/{{|-&gt;-|}}'
'{{|-&lt;-|}}h3{{|-&gt;-|}}',
'{{|-&lt;-|}}h3/{{|-&gt;-|}}'
), array (
'<h3>',
'<h3/>'
'<h3>',
'<h3/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h4{{|-&gt;-|}}',
'{{|-&lt;-|}}h4/{{|-&gt;-|}}'
'{{|-&lt;-|}}h4{{|-&gt;-|}}',
'{{|-&lt;-|}}h4/{{|-&gt;-|}}'
), array (
'<h4>',
'<h4/>'
'<h4>',
'<h4/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h5{{|-&gt;-|}}',
'{{|-&lt;-|}}h5/{{|-&gt;-|}}'
'{{|-&lt;-|}}h5{{|-&gt;-|}}',
'{{|-&lt;-|}}h5/{{|-&gt;-|}}'
), array (
'<h5>',
'<h5/>'
'<h5>',
'<h5/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}h6{{|-&gt;-|}}',
'{{|-&lt;-|}}h6/{{|-&gt;-|}}'
'{{|-&lt;-|}}h6{{|-&gt;-|}}',
'{{|-&lt;-|}}h6/{{|-&gt;-|}}'
), array (
'<h6>',
'<h6/>'
'<h6>',
'<h6/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}li{{|-&gt;-|}}',
'{{|-&lt;-|}}li/{{|-&gt;-|}}'
'{{|-&lt;-|}}li{{|-&gt;-|}}',
'{{|-&lt;-|}}li/{{|-&gt;-|}}'
), array (
'<li>',
'<li/>'
'<li>',
'<li/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}ul{{|-&gt;-|}}',
'{{|-&lt;-|}}ul/{{|-&gt;-|}}'
'{{|-&lt;-|}}ul{{|-&gt;-|}}',
'{{|-&lt;-|}}ul/{{|-&gt;-|}}'
), array (
'<ul>',
'<ul/>'
'<ul>',
'<ul/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}ol{{|-&gt;-|}}',
'{{|-&lt;-|}}ol/{{|-&gt;-|}}'
'{{|-&lt;-|}}ol{{|-&gt;-|}}',
'{{|-&lt;-|}}ol/{{|-&gt;-|}}'
), array (
'<ol>',
'<ol/>'
'<ol>',
'<ol/>'
), $s );
$s = str_replace ( array (
'{{|-&lt;-|}}pre{{|-&gt;-|}}',
'{{|-&lt;-|}}pre/{{|-&gt;-|}}'
'{{|-&lt;-|}}pre{{|-&gt;-|}}',
'{{|-&lt;-|}}pre/{{|-&gt;-|}}'
), array (
'<pre>',
'<pre/>'
'<pre>',
'<pre/>'
), $s );
// cleanup
$s = str_replace ( array (
'{{|-',
'-|}}'
'{{|-',
'-|}}'
), array (
'',
''
'',
''
), $s );
return $s;
}
function linkify($input) {
$pattern = '@(http(s)?://)?(([a-zA-Z])([-\w]+\.)+([^\s\.]+[^\s]*)+[^,.\s])@';
return $output = preg_replace ( $pattern, '<a href="http$2://$3">$0</a>', $input );
}
function inStr($needle, $haystack) {
if (strpos ( $haystack, $needle ) !== false) {
return true;
}
return false;
}
?>