Jancuokjaran

auto visitor

Aug 29th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.34 KB | None | 0 0
  1. <script language=javascript>
  2. setTimeout("location.href='http://auto-visit.blogspot.co.id/'", 10000);
  3. </script>
  4. </head> <body style="background-color:#0A171F; color:#FFFFFF;">
  5. <font color="#33FFFF"> <h1><abbr title="JavaScript"> </abbr> <abbr title="Auto Visitor Blogger"> Auto Visitor Blogger </abbr></h1> </font>
  6.  
  7. <div style="position:absolute; width:100%; height:100%;">
  8. <div style="width:490px; height:331px; position:absolute;">
  9. <br/><img src="http://i66.tinypic.com/xcnm6x.gif" width="480" height="300"/>
  10. </div>
  11. <div style="width:240px; height:100px; position:absolute;left:500px;">
  12. <fieldset style="width:100%; height:100%;">
  13. <legend>Step 1. URL Anda:</legend>
  14. <label>url (harus pakai http://) : <br /> <input id="targetURL" style="width:100%;" value="" /></label> <!-- disabled="true" -->
  15. <small>Contoh : https://www.google.com/</small>
  16. </fieldset>
  17. </div>
  18. <div style="width:240px; height:100px; position:absolute; left:780px;">
  19. <fieldset style="width:100%; height:100%;">
  20. <legend>Step 2. Mulai Sekarang?</legend>
  21. <button id="fireButton" style="background-color:#336494; border-color:#FFF; color:#FFF; width:240px; height:70px;"> MULAI</button>
  22. </fieldset>
  23. </div>
  24. <div style="width:240px; height:160px; position:absolute; left:500px; top:150px;">
  25. <fieldset style="width:100%; height:100%;">
  26. <legend>Pilihan</legend>
  27. <label>Permintaan Auto Visitor/Detik : <input style="width:40px;" id="rps" value="10000" /></label><br />
  28. <label>Pesan : <br /><input style="width:100%;" id="message" value="GUNAKAN DENGAN BIJAK" /></label>
  29. </fieldset>
  30. </div>
  31. <div style="width:240px; height:160px;  position:absolute; left:780px; top:150px;">
  32. <fieldset style="width:100%; height:100%;">
  33. <legend>Status:</legend>
  34. <dl>
  35. <dt>Permintaan:</dt>
  36. <dd id="requestedCtr">0</dd>
  37. <dt style="opacity: 0.5; color: green;">AUTO VISITOR SUCCES :</dt>
  38. <dd style="opacity: 0.5" id="succeededCtr">0</dd>
  39. <dt style="opacity: 0.5; color: red;">AUTO VISITOR GAGAL :</dt>
  40. <dd style="opacity: 0.5" id="failedCtr">0</dd>
  41. </dl>
  42. </fieldset>
  43. </div>
  44. </div>
  45.  
  46. <script>
  47. (function () {
  48. var fireInterval;
  49. var isFiring = false;
  50. var requestedCtrNode = document.getElementById("requestedCtr"),
  51. succeededCtrNode = document.getElementById("succeededCtr"),
  52. failedCtrNode = document.getElementById("failedCtr"),
  53. targetURLNode = document.getElementById("targetURL"),
  54. fireButton = document.getElementById("fireButton"),
  55. messageNode = document.getElementById("message"),
  56. rpsNode = document.getElementById("rps"),
  57. timeoutNode = document.getElementById("timeout");
  58. var targetURL = targetURLNode.value;
  59. targetURLNode.onchange = function () {
  60. targetURL = this.value;
  61. };
  62. var requestsHT = {}; // requests hash table, may come in handy later
  63. var requestedCtr = 0,
  64. succeededCtr = 0,
  65. failedCtr = 0;
  66. var makeHttpRequest = function () {
  67. if (requestedCtr > failedCtr + succeededCtr + 10000) { //Allow no more than 10000 hung requests
  68. return;
  69. };
  70. var rID =Number(new Date());
  71. var img = new Image();
  72. img.onerror = function () { onFail(rID); };
  73. img.onabort = function () { onFail(rID); };
  74. img.onload = function () { onSuccess(rID); }; // TODO: it may never happen if target URL is not an image... // but probably can be fixed with different methods
  75. img.setAttribute("src", targetURL + "?id=" + rID + "&msg=" + messageNode.value);
  76. requestsHT[rID] = img;
  77. onRequest(rID);
  78. };
  79. var onRequest = function (rID) {
  80. requestedCtr++;
  81. requestedCtrNode.innerHTML = requestedCtr;
  82. };
  83. var onComplete = function (rID) {
  84. delete requestsHT[rID];
  85. };
  86. var onFail = function (rID) {
  87. // failedCtr++;
  88. //failedCtrNode.innerHTML = failedCtr;
  89. succeededCtr++; //Seems like the url will always fail it it isn't an image
  90. succeededCtrNode.innerHTML = succeededCtr;
  91. delete requestsHT[rID]; // we can't keep it forever or it would blow up the browser
  92. };
  93. var onSuccess = function (rID) {
  94. succeededCtr++;
  95. succeededCtrNode.innerHTML = succeededCtr;
  96. delete requestsHT[rID];
  97. };
  98. fireButton.onclick = function () {
  99. if (isFiring) {
  100. clearInterval(fireInterval);
  101. isFiring = false;
  102. this.innerHTML = "MULAI";
  103. } else {
  104. isFiring = true;
  105. this.innerHTML = "Hentikan";
  106. fireInterval = setInterval(makeHttpRequest, (10000 / parseInt(rpsNode.value) | 0));
  107. }
  108. };
  109. })();
  110. isFiring = true;
  111. document.getElementById("fireButton").innerHTML = "MULAI";
  112. fireInterval = setInterval(makeHttpRequest, (10000 / parseInt(document.getElementById("rps").value) | 0));
  113. </script>
Add Comment
Please, Sign In to add comment