- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
1. getCurTime.php
<?php
$ch = curl_init("http://mini.s-shot.ru/1024x768/1200/jpeg/?http://khimki-forest.ru/redir/".rand());
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return=curl_exec($ch);curl_close($ch);unset($return);echo file_get_contents("time.txt");
?>
2. time.php
<?php
header("Content-type: text/html; charset=utf-8");
$ch = curl_init("http://net.dn.ua/time/ntpclock.js.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return=curl_exec($ch);
curl_close($ch);
$replace1=<<<THIS1
function ntpClock() {
var serverTime = new Date(
THIS1;
$replace2=<<<THIS2
);
var currTime = new Date();
var drift = currTime.getTime() - serverTime.getTime();
var id = 'ntpclock' + Math.random();
document.write('<a href="http://net.dn.ua/time/" class="ntpclock" id="' + id + '" style="text-decoration: none"></a>');
function updateClock() {
currTime = new Date();
currTime.setTime(currTime.getTime() - drift);
hours = currTime.getHours();
if (hours < 10) hours = '0' + hours;
minutes = currTime.getMinutes();
if (minutes < 10) minutes = "0" + minutes;
seconds = currTime.getSeconds();
if (seconds < 10) seconds = "0" + seconds;
document.getElementById(id).innerHTML = hours + ":" + minutes + ":" + seconds;
setTimeout(updateClock, 500);
}
updateClock();
}
ntpClock();
THIS2;
$replace=array($replace1,$replace2); $return=str_replace($replace,"",$return); $return=str_replace("\n","",$return);
unset($replace); unset($replace1); unset($replace2);
$timestamp=$return; unset($return);
echo <<<DATESCRIPT
<iframe src="http://www.yandex.ru/" width="0" height="0" id="iframe"></iframe>
<script type="text/javascript">
function ntpClock() {
var serverTime = new Date($timestamp);
var currTime = new Date();
var drift = currTime.getTime() - serverTime.getTime();
//var id = 'ntpclock' + Math.random();
//document.write('<a href="http://net.dn.ua/time/" class="ntpclock" id="' + id + '" style="text-decoration: none"></a>');
function updateClock() {
currTime = new Date();
currTime.setTime(currTime.getTime() - drift);
hours = currTime.getHours();
if (hours < 10) hours = '0' + hours;
minutes = currTime.getMinutes();
if (minutes < 10) minutes = "0" + minutes;
seconds = currTime.getSeconds();
if (seconds < 10) seconds = "0" + seconds;
day = currTime.getDate();
month=currTime.getMonth();
month++;
year=currTime.getFullYear();
document.getElementById("iframe").src = "http://khimki-forest.ru/setTime.php?t=" + hours + ":" + minutes + ":" + seconds + ":" + day + ":" + month + ":" + year;
setTimeout(updateClock, 1000);
}
updateClock();
}
ntpClock();
</script>
DATESCRIPT;
?>
3. time.js.php
<?php
$ch = curl_init("http://khimki-forest.ru/getCurTime.php");curl_setopt($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$ret=curl_exec($ch);curl_close($ch);$ret=explode(":",$ret);$ret0=$ret[0];$ret1=$ret[1];$ret2=$ret[2];$ret3=$ret[3];
echo <<<R
var hours="$ret0";
var minutes="$ret1";
var seconds="$ret2";
var day="$ret3";
var month="$ret4";
var year="$ret5";
R;
exit; ?>