Last active
August 29, 2015 14:08
-
-
Save 4xes/a530ad0a116f1508115a to your computer and use it in GitHub Desktop.
cheat votes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandom(min, max) | |
{ | |
return Math.random() * (max - min) + min; | |
} | |
var url = 'http://photo.missmiet.ru/rate.php'; | |
var id_save = 2352; | |
var id_loser = 2255; | |
var id_winner = 2325; | |
var winner; | |
var count = 0; | |
var next_frecency = Math.floor(getRandom(100,5000));; | |
var myFunction = function(){ | |
clearInterval(interval); | |
next_frequency = Math.floor(getRandom(100,5000)); | |
winner = Math.floor(getRandom(id_winner-1,id_winner+4)); | |
id_loser = Math.floor(getRandom(id_winner-70,id_winner+70)); | |
if(id_winner == id_loser || id_loser == id_save){ | |
}else { | |
var xhr = new XMLHttpRequest(); | |
var params = 'winner=' + winner + '&loser=' + id_loser; | |
xhr.open("POST", url, true); | |
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
xhr.send(params) | |
console.log(next_frequency +" " + ++count + " " + "id_loser=" + id_loser + " id_winer=" + winner); | |
} | |
interval = setInterval(myFunction, next_frequency); | |
} | |
var interval = setInterval(myFunction, counter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment