-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutils.php
28 lines (28 loc) · 848 Bytes
/
utils.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
<?php
function getpageurl($args = false) {
$pageURL = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER["HTTPS"] == "on"){
$pageURL .= "s";
}
$requestURL = $_SERVER['REQUEST_URI'];
if(!$args){
$requestURL = strtok($requestURL, '?');
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $requestURL;
}else{
$pageURL .= $_SERVER["SERVER_NAME"] . $requestURL;
}
return $pageURL;
}
function jump_noreferer($url){
echo "<html><head>
<meta name='referrer' content='never'>
<meta http-equiv='content-type' content='text/html;charset=UTF-8' />
</head><a href='".$url."' id='b'></a>
<script>
document.getElementById('b').click();
</script></html>";
}
?>