-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunc.php
95 lines (86 loc) · 2.32 KB
/
func.php
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/**
* @source code designed by Muhsin Mohamed Pc for http://www.howi.in
* Report bugs and errors to waphunt@gmail.com
* @This script was coded with the help of many other github projects. I thanks to them
* @Take backup before editing the script
*/
include('curl.php');
@ini_set('zlib.output_compression',0);
@ini_set('implicit_flush',1);
@ob_end_clean();
set_time_limit(0);
ob_implicit_flush(1);
$time = time();
function go($url){
header('Location: '.$url);
exit;
}
function input($text){
return trim(htmlspecialchars($text));
}
function output($text,$html=true){
if($html){
return trim(stripslashes($text));
} else {
return trim(htmlspecialchars(stripslashes($text)));
}
}
function rword($length = 10,$allow="all") {
if($allow=="all")
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
elseif($allow=="num")
$characters = '0123456789';
elseif($allow=="en")
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
elseif($allow=="low")
$characters = 'abcdefghijklmnopqrstuvwxyz';
elseif($allow=="up")
$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
else
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
function sor($html)
{
$html=htmlspecialchars($html);
return $html;
}
function clean($html)
{
$html = str_replace(array("\r\n", "\r", "\n"), "", $html);
return $html;
}
function show($text,$color="darkred")
{
echo '<font color="'.$color.'">'.$text.'</font><br/>';
ob_flush();
flush();
}
function fc($text,$color="darkred")
{
echo '<font color="'.$color.'">'.$text.'</font>';
ob_flush();
flush();
}
function err($head="Error",$text="Error")
{
echo '<div class="head">'.$head.'</div><div class="content">'.$text.'</div>';
ob_flush();
flush();
include "foot.php";
ob_flush();
flush();
die();
}
/**
* @source code designed by Muhsin Mohamed Pc for http://www.howi.in
* Report bugs and errors to waphunt@gmail.com
* @This script was coded with the help of many other github projects. I thanks to them
* @Take backup before editing the script
*/
?>