How do I make this code (or its concept) work. it includes html, javascript, and php -


so i'm not familiar either javascript or php want create automated voter site. simple. have url increases vote count one. have verified entering url counts vote. site cookie must deleted before vote can take place.this have tried far (ps: hoping make work in chrome. if has alternative browser make work in thats fine to.):

<html> <body> <script type="text/javascript"> function clearcookies() { chrome.cookies.getall({domain: "domain.com"}, function(cookies) { for(var i=0; i<cookies.length;i++) { chrome.cookies.remove({url: "domain.com" + cookies[i].path, name: cookies[i].name}); } }); } </script> <?php set_time_limit(0); while(true){  echo "<script type=\"text/javascript\"> clearcookies(); </script>"; $useragent="mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.31 (khtml, gecko) chrome/26.0.1410.64 safari/537.31"; $ch = curl_init(); curl_setopt($ch, curlopt_url, "specific_url_to_vote");  curl_exec ($ch) ; curl_close($ch); sleep(6); } ?> </body> </html> 

so replace "domain.com" actual domain , "specific_url_to_vote" actual url. can me this? i've worked java , basic html before i'm not entirely sure how troubleshoot on own.

you're trying send request server using php curl , clear cookies, can re-vote.

the problem php makes request.

if want browser requests, ajax.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -