Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function $POST(url,pdata,success,err){var xmlhttp;timestamp=new Date();if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){success(xmlhttp.responseText);}else if(xmlhttp.status>500){err(1);}}
- xmlhttp.open("POST",url+"?type=1&ca="+timestamp.getTime(),true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(pdata);}
- function $GET(url,success,err){var xmlhttp;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){success(xmlhttp.responseText);}else if(xmlhttp.status>500){err(1);}}
- xmlhttp.open("GET",url+"&type=0&ca="+Math.random(),true);xmlhttp.send();}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement