Skip to content

Commit abb3101

Browse files
committed
Update index and counter
1 parent 26a7c4e commit abb3101

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

counter.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- your counter script here -->

index.php

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
$incscript = "<!-- your counter script here -->\n";
2+
$incscript = file_get_contents('counter.txt');
33

44
if (!isset($page)) $page = (isset($_GET['page']) ? $_GET['page'] : '');
55
if ($page == '') $page = 'index';
@@ -28,15 +28,7 @@
2828
$content = str_replace('%var_lon%', $lon, $content);
2929
$content = str_replace('%var_rad%', $rad, $content);
3030

31-
if (strpos($content, '</body>') !== false)
32-
{
33-
echo str_replace('</body>', $incscript.'</body>', $content);
34-
exit();
35-
}
36-
if (strpos($content, '</head>') !== false)
37-
{
38-
echo str_replace('</head>', $incscript.'</head>', $content);
39-
exit();
40-
}
31+
echo str_replace('</body>', $incscript.'</body>', $content);
32+
exit();
4133
}
4234
?>

0 commit comments

Comments
 (0)