| عناوین بحث ها | ارسال کننده | پاسخها | بازدید | بروز رسانی | اولویت | |
|---|---|---|---|---|---|---|
|
|
1760
|
7158
|
91/3/10 (02:10)
|
|
||
|
|
3
|
8
|
91/3/6 (20:12)
|
|
||
|
|
26
|
31
|
91/3/1 (14:47)
|
|
||
|
|
1
|
7
|
91/2/28 (02:35)
|
|
||
|
|
3
|
33
|
91/2/20 (10:06)
|
|
||
|
|
0
|
0
|
91/2/17 (14:51)
|
|
||
|
|
1
|
8
|
91/2/1 (22:35)
|
|
||
|
|
3
|
28
|
91/1/28 (13:16)
|
|
||
|
|
1
|
13
|
91/1/26 (08:43)
|
|
||
|
|
3
|
21
|
91/1/26 (03:36)
|
|
||
|
|
1
|
14
|
91/1/24 (23:47)
|
|
||
|
|
2
|
17
|
91/1/24 (23:46)
|
|
||
|
|
0
|
6
|
91/1/21 (00:39)
|
|
||
|
|
2
|
44
|
91/1/14 (22:08)
|
|
||
|
|
1
|
10
|
91/1/7 (00:15)
|
|
||
|
|
2
|
57
|
90/12/28 (20:30)
|
|
||
|
|
1
|
20
|
90/12/22 (15:53)
|
|
||
|
|
1
|
41
|
90/12/13 (00:05)
|
|
||
|
|
0
|
13
|
90/12/8 (20:27)
|
|
||
|
|
1
|
36
|
90/12/2 (02:49)
|
|
<html>
<head>
<title>BargePoller</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css" media="screen">
body{ background:#000;color:#fff;font-size:.9em; }
.msg{ background:#aaa;padding:.2em; border-bottom:1px #000 solid}
.old{ background-color:#246499;}
.new{ background-color:#3B9957;}
.error{ background-color:#992E36;}
</style>
<script type="text/javascript" charset="utf-8">
function addmsg(type, msg){
/* Simple helper to add a div.
type is the name of a CSS class (old/new/error).
msg is the contents of the div */
$("#messages").append(
"<div class='msg "+ type +"'>"+ msg +"</div>"
);
}
function waitForMsg(){
/* This requests the url "msgsrv.php"
When it complete (or errors)*/
$.ajax({
type: "GET",
url: "msgsrv.php",
async: true, /* If set to non-async, browser shows page as "Loading.."*/
cache: false,
timeout:50000, /* Timeout in ms */
success: function(data){ /* called when request to barge.php completes */
addmsg("new", data); /* Add response to a .msg div (with the "new" class)*/
setTimeout(
'waitForMsg()', /* Request next message */
1000 /* ..after 1 seconds */
);
},
error: function(XMLHttpRequest, textStatus, errorThrown){
addmsg("error", textStatus + " (" + errorThrown + ")");
setTimeout(
'waitForMsg()', /* Try again after.. */
"15000"); /* milliseconds (15seconds) */
},
});
};
$(document).ready(function(){
waitForMsg(); /* Start the inital request */
});
</script>
</head>
<body>
<div id="messages">
<div class="msg old">
BargePoll message requester!
</div>
</div>
</body>
</html><?php
if(rand(1,3) == 1){
/* Fake an error */
header("HTTP/1.0 404 Not Found");
die();
}
/* Send a string after a random number of seconds (2-10) */
sleep(rand(2,10));
echo("Hi! Have a random number: " . rand(1,10));
?> $(document).ready(function(){
waitForMsg(); /* Start the inital request */
});msgsrv.php نام دارد ارسال شده و این فایل تغییرات جدید را بر میگرداند