title: How do I make this code (or its concept) work. it includes html, javascript, and php
body: <p>so i'm not very familiar with either javascript or php but what i want to do is create an automated voter for a certain site. its very simple. I have a url which increases the vote count by one. I have verified that entering this url counts as a vote. however the site cookie must be deleted before another vote can take place.This is what i have tried so far (ps: hoping to make this work in chrome. if anyone has an alternative browser to make it work in thats fine to.):</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;script Type="text/javascript"&gt;
  function clearCookies()
  {
  chrome.cookies.getAll({domain: "Domain.com"}, function(cookies) {
  for(var i=0; i&lt;cookies.length;i++) {
  chrome.cookies.remove({url: "Domain.com" + cookies[i].path, name: cookies[i].name});
  }
  });
  }
  &lt;/script&gt;
  &lt;?php
  set_time_limit(0);
  while(true){ 
  echo "&lt;script Type=\"text/javascript\"&gt; clearCookies(); &lt;/script&gt;";
  $useragent="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like 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);
  }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>so obviously i replace "Domain.com" with the actual domain and "Specific_URL_To_Vote" with the actual URL. can anyone help me with this? i've really only worked with java and basic html before so I'm not even entirely sure how I would troubleshoot this on my own.</p>